Workflows: How to set a workflow variable that is the difference in hours between now and a created date

I'm trying to create a variable that contains the number of hours between the item created date and Now.  When i use TODAY, it seems to set the time at 12:00 rather than the time now - so that throws the hours off.  Any ideas?
ajw

Hi ajw,
According to your description, my understanding is that you want to calculate the hours between the item created date and now.
It seems to be not an OOB way to implement your requirement, to get the current time, you need to create a custom workflow activity for SharePoint 2010 workflow. About creating custom workflow activity, you can refer to the links below:
http://msdn.microsoft.com/en-us/library/hh872790(v=office.14).aspx
http://blogs-sharepoint-ashutoshmisra.blogspot.in/2013/02/create-custom-workflow-action-for.html
Or, you can use a third party solution to achieve your requriement.
Here are some similar posts for you to take a look at:
http://social.technet.microsoft.com/Forums/sharepoint/en-US/e93ea37a-df09-4cbf-a58d-5d4def3d3d42/how-to-compare-time-in-sharepoint-designer-2010sp-2010-workflow?forum=sharepointgeneralprevious
http://blog-sharepoint.blogspot.in/2009/03/get-current-time-in-sharepoint-designer.html
I hope this helps.
Thanks,
Wendy
Wendy Li
TechNet Community Support

Similar Messages

  • Is there any way to disable the setting (?) in version 28.0 that blocks the exchange of text between Firefox and other software?

    Since version 28.0 of Mozilla Firefox, our word prediction software Skippy can no longer interact with Mozilla. It seems like additional security measures were taken to disallow software from picking up what is being typed and sending new text to Firefox. Is there any way to circumvent this or is there an advanced option that can disable this functionality? Or could there be any other cause?
    Thank you

    Have you done any "standard" troubleshooting in Firefox? <br />
    Like maybe tried the Firefox SafeMode? <br />
    https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode
    Have you contacted Key Technologies about that incompatibility? <br />
    http://www.gokeytech.com/skippy_word_predictor.htm <br />
    http://www.gokeytech.com/contact_us.htm

  • How can i reuse same variables that i create using c:set var="index" /

    hi all,
    please some one helpme!!!!!!
    how can i reuse same variable that i create using
    <c:set var="index" value="${0}"/>
    cause later in the program i use index to do some condition and based on that i increment ...
    so for example if i say...
    <c:if test="${index==0}">
    <c:set var="index" value="${index+1}"/>
    </c:if>
    will it be like
    if(index==0)
    index++;
    can i do like i did be4. if not what do i need to do to reuse. cause i use the variable atleast 5 time and its keep changing on diff condition level.

    Have you tried it?
    It should work, provided you are on the same page.
    The c:set tag creates the variable in pageScope by default.
    If you forward to another JSP you need to set the scope to be "request" so that it is still available.

  • How to set a session variable

    Hi,
    I would like to know how to set a session variable for the following purpose.
    At the top of my application I have a "Welcome <username>" I'd like it instead to have "Welcome <firstname> <lastname>".
    So the concept would be after the user logs in succesfully this session variable is dynamically set so it can be displayed.

    Hi Scott,
    I realize that I can set items etc in pages. The case I'm referring to is a reference in a template. My template has a "Welcome <user name>" ... so the code looks like "Welcome &APP_USER." Anyway to make it say "Welcome first_name last_name" in the template? Note I'll have to get the first/last names from a query
    Thanks,
    Marty

  • How to set ORACLE_HOME environment variables in win 2003

    Can anyone tell me how to set ORACLE_HOME environment variables in Win2003
    Please tell me the significance of that also.It will be really helpful if u can help me out from Path variable seting of JAVA SDK also... Thanks in advance...

    hi
    use this code IN FORMS60 variable in Regedit
    \\server\DATA\store\Forms;
    Rizwan

  • I cannot figure out how to set my apple id to use: itunes (two of accounts), apps store and Itunes store. How do I make one password that will be recognixed by all these devices?

    I cannot figure out how to set my apple id to use: itunes (two of accounts), apps store and itunes store. How do I make one password that will be recognized by all these devices? My apple id is constantly not working.

    Hi Lrwill,
    If the apps that are on your son's iPad were purchased under his Dad's Apple ID, then signing your Apple ID onto the iPad will not help you with updating those apps.
    Also, if the iPad was sync'd with his Dad's iTunes library, then hooking it up to your computer/iTunes library, will require you to reset the iPad, and everything that was loaded under the other Library and Apple ID will be wiped out.
    Can you provide a little more info about what was set up under which Apple ID and what iTunes library the iPad was sync'd with?
    Cheers,
    GB

  • How do I set up my airport express to make a connection with my Hp? I already have it set up for my mac laptop just not sure how to set it up so that theres also a connection with my Hp

    how do I set up my airport to make a connection with my Hp? I already have it set up for my mac laptop just not sure how to set it up so that theres also a connection with my Hp

    I set up my new HP Descjet 3054A . I had a problem becouse Apple give me CD as a driver. The thing was that CD wasn good for this printer becouse it was old software:) I had to go to Apple store so the specialist had to download me he wright driver. Becouse I didnt wannet to screw this up . When he downloaded driver I fired it up at house and thingworks perfect. The thing is when you download all the software from HP side . Then you have to connect your MAC to printer via USB . Fallow the instructions it should works. Worked for me. Good Luck!

  • IMac at work, iMac at home. (Latest Yosemite and Apple Remote Desktop updates installed) Need to work from home at night. I don't know how to set my permissions so that I can just control my iMac at work.

    iMac at work, iMac at home. (Latest Yosemite and Apple Remote Desktop updates installed) Need to work from home at night. I don't know how to set my permissions so that I can just control my iMac at work.

         If they have set up port forwarding for you already then that is different.  In that case, then you could be experiencing the bug with the most recent release of ARD (3.7.2) and in particular ARD 3.7.2 and Yosemite ARD version 3.8 clients.  It has been reported numerous times in the forums and to Apple that since 3.7.2, clients are frequently unavailable to connect to despite there being no network issue between the remote computer and client computer.  I have not seen anyone report it who was working from outside the LAN to inside the LAN, but I have the same issue with a number of my own computers that are simply on a different subnet, so it stands rot reason that it would happen from a port forwarding location.
         I am sometimes able to resolve the issue locally by SSH connecting into the client computer using Terminal on my admin machine and restarting or relaunching the ARD agent on the remote device, then trying to connect to it again after about 30 seconds.
    The Terminal commands for this procedure are as follows, though you might need to include a port number from outside the LAN:
    First:
    ssh ipaddress -l adminusername
    (example: ssh 192.168.1.1 -l macadmin)
    Second:
    sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/k ickstart -restart -agent
    After that, waiting about 30 seconds and trying to observe or control usually works, though the computer may still fail to show an online or lit-up status indicator.

  • HT3477 Again, another page saying that the device supports WiFi guests it but HOW to set it up? Where in the ultility is it?

    Again, another page saying that the device supports WiFi guests it but HOW to set it up? Where in the ultility is it?

    Open AirPort Utility and click Manual Setup
    Click the Guest Network tab below the icons
    If the Guest Network tab does not appear, you have the Time Capsule connected to a modem/router, not a simple modem. The Guest Network cannot be enabled unless you have the Time Capsule connected to a simple modem.

  • How I set my Q5 so that reminders (for appointments, etc.) are displayed on my home screen?

    How I set my Q5 so that reminders (for appointments, etc.) are displayed on my home screen?
    Solved!
    Go to Solution.

    Swipe down from the top of your homescreen and select Settings>Notifications. Near the bottom you'll see in blue letters Lock Screen Settings. Click that and toggle Lock Screen Notifications to ON. Now whenever you have an appointment in your Calendar, it'll show up that day on your Lock Screen.
    Cheers.  
    - If my response has helped you, please click "Options" beside my post and mark it as solved. Clicking the "thumbs up" icon near the bottom of my response would also be appreciated.

  • How do I set up a template that opens the mix and arrange windows in multiple screens? I am using Mac OSX 10.6.4 and Logic 9. Thanks in advance for your time and advice.

    I want to be able to set up a template that opens my mix window on my laptop, and my arrange page on my bigger HP monitor.
    It seems that saving the template while this configuration is set doesn't save it.
    Bum.

    Hi microjac,
    You should be able to open the desired windows and lock the Screenset using the Screenset menu in the global menu bar. Then save as a template. This works using an Apple monitor with a MBP so hopefully will work with any display.
    mrjferrell

  • How to set a specific starting time for the falling snow code snippet

    Hi everyone
    I want to use the falling snow code snipet but I don't want it it to start as soon the movie starts.
    So how to set a specific time to start the falling snow?
    Thanks
    Patricia

    put the code (that's not in a function body and excluding variable declarations and import statements) in a function body and call it using the timer class.

  • In flex, How to set a value to one parameter, the parameter defined in a cffunction in a cfc file

    In flex, How to set a value to one parameter, the parameter
    defined in a cffunction in a cfc file, In the cffunction there are
    much cfargument, I want set a value to one of them, such as the
    cfc:
    <cffunction access="remote" name="myShow" output="false"
    returntype="struct">
    <cfargument name="ID" type="numeric" default=0>
    <cfargument name="GoodsID" type="string" default="">
    <cfargument name="DestTime" type="string" default="">
    <cfargument name="DestCount" type="numeric" default=1>
    How I set a value to only parameter one of them , such as set
    GoodsID when use mx:remoteObject.
    Thanks for your help

    Got maybe a solution for you, I have just tested it.
    So, the idea is to use intermediate variables. Imagine Var1 and Var2 variables that you refresh with your more or less complicated queries. Then what you can do is to refresh your final variable Var3 with a query using your intermediate variables. Here is an example for Oracle:
    select #Var1+#Var2 from dual
    This way you can make a chain of dependent variables: Var3 is using Var2 and Var2 is using Var1.
    Hope it helps.
    Shamil

  • How to set a specific width to all the TextInputs used in a mxml file on its creation complete?

    How to set a specific width to all the TextInputs used in a mxml file on its creation complete?

    Hi subhajit nag,
    I think the best approach would what I say is if you can make use of a Global variable or using a Singleton class having a variable which can be accessed globally through out the application.
    Below is the sample what I am talking to:
    So in below example you can access the variables textInputWidth and textInputHeight globally throghout the application since you have decalred them in main mxml file.
    You can access these variabled in another mxml file as Application.application.textInputWidth and Application.application.textInputHeight. So if at all you are required to modify these values you are only required to modify at a single place in main mxml file..thats it.
    If you are use any Singleton classes like ModelLocator you can place these variables in this class and refer from that class.
    Hope this resoved your problem..
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
    <mx:Script>
      <![CDATA[
       [Bindable]private var textInputWidth:int = 250;
       [Bindable]private var textInputHeight:int = 25;
      ]]>
    </mx:Script>
    <mx:Canvas id="canvas1">
      <mx:TextInput id="txt1" width="{textInputWidth}" height="{textInputHeight}"/> 
    </mx:Canvas>
    <mx:Canvas id="canvas2">
      <mx:TextInput id="txt2" width="{textInputWidth}" height="{textInputHeight}"/> 
    </mx:Canvas>
    <mx:Canvas id="canvas3">
      <mx:TextInput id="txt3" width="{textInputWidth}" height="{textInputHeight}"/> 
    </mx:Canvas>
    <mx:TextInput id="txt4" width="{textInputWidth}" height="{textInputHeight}"/>
    <mx:TextInput id="txt5" width="{textInputWidth}" height="{textInputHeight}"/>
    </mx:Application>
    If this post answers your question or helps, please kindly mark it as such.
    Thanks,
    Bhasker Chari 

  • I had the iPhone 5 for a while and my Macbook Air was sending me the incoming messages from that phone, however I just upgraded to the 6 Plus and was wondering how I can get my laptop to recognize the messages from this phone now on iMessages.

    Okay so my Macbook Air has always allowed me to receive iMessages from my iPhone 5 to my computer. So basically I could use both to text.. However I just upgraded to the iPhone 6 Plus and I would like the same to happen again with my new phone, but I don't know how. How can my incoming iMessages from my new iPhone 6 plus show up on my laptop?
    -I see all the messages from my old iPhone there, but I would like to know how to set it up so that i can view the messages from my new phone.

    Hi,
    If you are signed onto the same iCloud/Apple ID for Messages, then the second number should have been registered with your Messages on the Mac at the time it was verified.
    To check this, open Messages on the Mac, click on Accounts, and see if the number is displaying and checked. If it is not, Sign out of Messages on your new device and then sign on again.
    Again, phones need to be signed onto the same Messages account that you have set up in Messages.
    Cheers,
    GB

Maybe you are looking for