How do I work around lack of time comparison?

  • 29 October 2015
  • 3 replies
  • 2 views

Badge +4

Hi All,

From what I read, Nintex does not compare the time portion of date fields, which is frustrating. My current design is as follows:

 

A document routes for coordination and has an attribute that contains the day and time that the coordination should end: endDate. 

A site workflow runs that queries for documents whose endDate is <= now.  If true, do something.

The site workflow is scheduled to run daily after business hour.

 

This design is great in theory because I can extend or shorten the review time as long as I do so before the workflow runs on the current endDate.  The problem I recently encountered, is when SP's timer service has an issue and found that the workflow can run at a time other than it's scheduled end of day run.  This workflow executing early combined with the non-time comparison leads to the coordination on my document ending before it should. 

 

How can I build in a fail safe for this scenario?

 

Thanks,
Erin


3 replies

Badge +7

Hi Erin,

To use the time portion of Today'date in a condition, you just have to use a workflow variable as below:

135588_pastedImage_0.png

Then,

135712_pastedImage_0.png

Badge +4

From this pot

Date Comparison in WF

And my testing, the time is ignored by the server

Badge +5

Is it possible for you to check if it is valid within the workflow?  You can use the Math operation action to compare the two dates.  If the calculated value is greater than or equal to zero, let the workflow continue for that item, otherwise ignore it. 

Reply