Hello, I am running into an issue and after trying formula after formula, reading forum after forum... I still can't seem to figure it out.
I have a Nintex form, and there are multiple date entry fields for each section of the form. The first pair is "Start Date" and "End Date" which uses date only. The other two pairs I have which appear about 6~9 times are "Start Date & Time" and "End Date & Time", as well as "Issue Date & Time" and "Return Date & Time". I have applied rules to each in attempt to prevent the Return/End dates from being before the Issue/Start dates.
The controls that only use the Date and not the time work perfectly with...
When: GreaterThan(StartDate,EndDate)
Then: Invalidate
Validation Message: End date must be after start date
But when I try to do this with fields using date and time, the rule does not do anything at all even when the formula should be shooting out as true.
I tried:
- GreaterThan(StartDateTime,EndDateTime)
- LessThan(EndDateTime,StartDateTime)
- Tried the above with "<" and ">"
- Tried using {self} in place of EndDateTime since that is where I am applying the rule
- formatDate(EndDateTime,"yyyyMMddHHmm")<formatDate(StartDateTime,"yyyyMMddHHmm")
- dateDiffHours(formatDate(EndDateTime,"yyyyMMddHHmm"),formatDate(StartDateTime,"yyyyMMddHHmm")
- Tried saying dateDiffHours must be >0 (when end, start) <0 with other way around
- Tried having a separate calculated field to output string value and reference it from rule
I've tried other things but I just don't remember exactly what I else I tried off the top of my head. I've read in several places that the Time portion of he Date/Time control can be odd as it defaults to 00:00 and doesn't refresh instantly. If anyone knows what I can do to resolve this issue and get this rule working, I would greatly appreciate it! Pleas let me know if there is any other information I can provide to help answer this question. Thank you very much for your time in advance (: