The TextToDateValidate function is a built-in function that returns true if Text t can be converted to a Date value.
You can use this function before converting the Text value to a Date value with the TextToDate function.
t: Text Type
Boolean Type
Usage |
Result |
TextToDateValidate( "2002-01-01" ) |
True |
TextToDateValidate( "2002/01/01" ) |
True |
TextToDateValidate( "2002.01.01" ) |
True |
TextToDateValidate( "2002-25-01" ) |
False |
TextToDateValidate( "2002/02/31" ) |
False |
TextToDateValidate( "10000.01.01" ) |
False |
You should check the limits of the Date data type. You should also ensure that the date you type in the argument complies with the Date Format of the server which is, by default, YYYY-MM-DD, but may have been changed by your Service Center administrator.
See Also
TextToDate Function | Available Conversion Functions to Date | Available Built-in Functions