Best Practice - Applies to Infiniti v8.0 or later

 

Often when entering dates via Produce or receiving them from a data source, validations should be applied to ensure the date is accurate. Below are some common examples that can be adapted to suit your situation.

Future Date/Date cannot be in the past (example above)

Type: Compare

Comparison: Greater Than

Expression: today()

Message: ‘Your Message’

Notes:

  • Change the comparison to greater than or equals to include the current day.
  • Change the comparison type to less than etc to ensure the date is in the past.

At least ‘X’ Days, years, months etc. difference

The date add formula can be used to ensure the time difference is over a certain integer. For example ensure an applicant is over 18 or the delivery date is at least two weeks into the future.

Type: Compare

Comparison: Less Than or Equal

Expression: DateAdd(0,-18,today())

Message: ‘Applicant must be 18 years old’

Notes:

  • Change the comparison property together with the date add function (0=years and units -18) to suit your situation.
 
 
Keywords
 
validate check dob comparison year month day dateadd