cancel
Showing results for 
Search instead for 
Did you mean: 
cammic
Nintex Newbie

How to validate that end date is greater than start date

Jump to solution

I have two date fields: Start date and End Date. I am trying to find a way to validate that the end date is greater than or equal to the start date. If I used datediff, it gives me the number of days difference between the two dates, but only as a positive number (e.g. 1/8/2015 & 4/8/2015 = 3; 4/8/2015 & 1/8/2015 = 3, so using this to catch where the second example would normally be -3!!

I have looked everywhere to try and find a simple solution....HELP!!!

Labels: (1)
Tags (1)
Reply
4 Replies
patrick_hosch
Nintex Newbie

Re: How to validate that end date is greater than start date

Jump to solution

Hi Michael Campbell​, not sure why it doesn't show -3 (or any other negative value). i have just tried this using the DateDiffDays and DateDiffSeconds functions and both work as expected. I get negative values in case the end date is before the start date. can you share a screenshot?

0 Kudos
Reply
cammic
Nintex Newbie

Re: How to validate that end date is greater than start date

Jump to solution

DateDiffIssue.PNG

The 8 should be displayed as -8?? My Formula field is dateDiffDays(EndDate,StartDate)

0 Kudos
Reply
patrick_hosch
Nintex Newbie

Re: How to validate that end date is greater than start date

Jump to solution

this is caused by having the first date in the function as the end date. turn the dates in the function around: dateDiffDays(StartDate,EndDate)

Reply
omourad
Nintex Newbie

Re: How to validate that end date is greater than start date

Jump to solution

DateDiffDays return positive values only, to validate the date use greaterThan function instead.

0 Kudos
Reply