rob_n
Scholar

Specific time of day as workflow variable

I am building a workflow that will send out SMS notifications (using 3rd party API) and I want to put a decision point in the workflow to look at the time of day.  If the time of day is between, say, 8am and 5pm CST, I want the workflow to continue, otherwise, I want the workflow to take a different path where it'll just end.  

 

I'm having trouble figuring out how to set up the decision point step to do this?  I'm stumped, as in the date/time operators I just don't see how. 

 

Any thoughts are welcome.

 

Rob

 

Labels: (2)
0 Kudos
Reply
2 Replies
SarelL
Nintex MVP

Re: Specific time of day as workflow variable

Hi @rob_n 

 

You can use the DateTime functions/Expressions in the Context Browser. 

Compare the current Datetime (Now) with Add hours of today + 8 for 8 am and + 17 for 5 pm. Timezones will depend on your server settings. 

 

See the screenshots attached for more info. 

 

Regards

Sarel

0 Kudos
Reply
rob_n
Scholar

Re: Specific time of day as workflow variable

Thanks.  

 

I believe that would work.

 

After playing around with it, though, I just went ahead and used a SQL Stored Procedure instead.  Seemed like an easier approach to calculate the time difference in SQL.  

0 Kudos
Reply