I am currently trying to validate a column in my input file that should contain a date.
The date format that I need to validate is as follows:
Code: Select all
Mar 1 2005
Mar 17 2005
I would like to know the correct syntax when using the isValid function for 'non-standard' date formats.
Here are the things I have tried so far:
Code: Select all
isValid("date",InLink.DateToValidate)
Error:
Data string '3' does not match format '%yyyy-%mm-%dd': the value for tag %yyyy has fewer characters than expected.
isValid("date[%mmm %(d,s) %yyyy]",InLink.DateToValidate)
Error:
The schema type "date" does not take parameters "%mmm %(d,s) %yyyy"
isValid("date %mmm %(d,s) %yyyy",InLink.DateToValidate)
isValid("date(%mmm %(d,s) %yyyy)",InLink.DateToValidate)
Error
Parsing parameters for schema type "date": Expected "[" or EOF; got: "%"
isValid("date",InLink.DateToValidate["%mmm %(d,s) %yyyy"])
Error
Data string '' does not match format '%yyyy-%mm-%dd': an integer was expected to match tag %yyyy.
isValid("date",InLink.DateToValidate,"%mmm %(d,s) %yyyy")
Error
This comes out as an invalid derivation.
Please do not give me examples of the StringToDate function as a 'solution'. There are enough of those out there for people to search .
Thanks
Abhijit