I need to be able to create a workflow that evaluates the create date/time to determine if it was created between 10 am and 2 pm today, to take some action on records created during this period.
The times are fixed, but the date, of course, needs to be variable. How can I use date/time in a condition to check this?
Solved! Go to Solution.
I figured out how to manage this, and want to share the solution in case anyone else needs to accomplish something similar. It requires 3 calculate date actions.
The first I set to the current action execution date and checked the include time box. I stored this in a date/time variable called varCurrActionTime:
2nd calculate date action, sets my 10 am variable. I used the current date workflow context value, which defaults to 12am, and added 10 hours to it. This I stored in a date/time variable named var10am:
My 3rd calculate date action sets my 2 pm variable. I used the current date workflow context value, which defaults to 12am and added 14 hours to it. This I stored in a date/time variable named var2pm:
Once I had all these variables, I used them in my condition:
I wrote all the values to history:
Hope this can help someone else to use execution time as a condition.