How to validate US dates stored as YYYY-MM-DD
I have several fields that have dates stored in the format above. If I run the built in function "Is Date", the dates all fail. Is there a date system setting I need to change, or create my own function?
What date format does the "Is Date" function require?
Best Answer
-
Thanks Josh. The column is brought across as an alphanumeric. So looks like i should either import as date or do some conversion before validation.
0
Answers
-
Hi James
Do these columns have the Datatype 'Date' (<dataset> -> Options -> Annotate columns) when the data is loaded?
Also are these columns recognized by the Date Data Tag? If not then try to understand why, such as trailing spaces or an odd unicode hyphen/dash causing these dates to be seen as strings. (note you can train these tags to your specific format if required)
Useful discussion on formatting date values:
https://community.experianaperture.io/discussion/549/date-formatting
This function in the Function library is designed to have flexibility to accommodate all sorts of different date formats:
https://community.experianaperture.io/discussion/751/parse-date-%F0%9F%A7%BD
Hopefully that helps, but if not if you can provide some further details
0