Skip to main content

In Nintex forms, I need to compare two dates.

The first date is generated by taking the maximum value of the lookup runtime function. It is brought back as a code/serial number. Ex: 1385528400000

The second date is a value from a column within the list that the form is attached to. It is restricted to the available Nintex date/time formats, even if I use the max function on it as well. Ex: 10/29/2018

How do I convert a date/time code to a date/time? Or vice versa?

(this is cross-posted on Stack Exchange--I will update here if there is an answer there, and vice versa)

Your code/serial number looks like a JS-Style Timestamp to me, which would be milliseconds after 1.1.1970. You could use a function like this to convert it into a date:

dateAddMinutes(convertToDate("1.1.1970"), tbDateCode / 60000)

I used a form with a calculated value control with the above formula, and a TextBox named "tbDateCode" where you can enter the code (e.g.1385528400000, which would be November 27, 2013).

You should then be able to compare this to any other date value using just the lessThan or greaterThan functions.

Hope this helps

Martin


Reply