I need to compare the current datetime to a datetime field on my Nintex form for validation purposes. I'd like to ensure date and time entered in the form has already passed and does not occur in the future.
I am encountering one issue though, which does not make this as straightforward as I'd initially thought. The Current Date field returns the correct date, but always with 12:00 AM as the time. The Current Time field just provides the time, for example 12:28 PM.
Is there a built in way to access the full, current datetime with the correct time? If not, what would be the simplest way to format the Current Date and Time reference fields so that they can be compared to another datetime field using a Boolean function (in this case, greater than or less than).
Solved! Go to Solution.
I have the following solution. You can build a date object with current date and current time which You can use in a validation rule.
I used two Form variables:
Result is e.g.:
';' in formating string avoids supressing the leading zero in result string.
Now You can build the date object with formula:
This date object can be used in validation rule to test a Date/Time control.
Thanks Manfred, that looks like it should do the trick. I will try implementing this when I have some time and will update with my results.