AnsweredAssumed Answered

Validating a selected Date

Question asked by bimi82 on Oct 25, 2018
Latest reply on Oct 25, 2018 by bimi82

Hi,

 

I am trying to validate the date in a form via the rules and there are two fields: StartDate and EndDate.
The purpose is to validate the date and time when:

 

 

  • StartDate (including time) is equal to or greater than the EndDate (including time)

 

 

For example the below entry throws the error because it sees that 00:00 is lass then 08:00
which in fact are 8 hours from 00:00 midnight until 8:00am

 

 

StartDate:    25/10/2018 00:00
EndDate:     25/10/2018 08:00

 

The new formula should validate when dates are equal and the Time in EndDate is less than in StartDate otherwise let it go through any time when endDate is more than startDate. In simple term, dis-allow date/time in the past!

Validation formula used:

 

formatDate(FromDate, "dd/MM/yyyy hh:mm") > formatDate(UntilDate, "dd/MM/yyyy hh:mm")

Outcomes