Date validation

Hi,

I am trying to validate that a field exported from csv/excel is a date and nothing else(like number). Also, trying to check if the date is greater than ‘01/01/1900’. I tried converting the date to number and compare and the “>” operator fails. Can you please help me on this .

Thanks!

Never mind. I figured it out.

Typically, you can convert a text date to a number date (dates in EasyMorph are numbers as in Excel) using the date() function.

For instance, the validation expression could be as follows

date([MyTextDate], 'dd/MM/yyyy') > #1900-01-01

Here, the date() function converts a text date (e.g. ‘31/12/2018’) into a number date, than compares it with a date literal in the ISO format (which is also a number).

See also this tutorial article: Type system and expressions