ISO8601 ( source_date ; parameter )
Versatile function to covert and/or validate date inputs to YYYY-MM-DD text
Be the first to rate this function Log in to vote
|
RealGrouchy - Show more from this author
https://realgrouchy.blogspot.com |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
This function takes date inputs in various specified or unknown formats and coverts it to YYYY-MM-DD text format, or can be used to validate whether a given input is in YYYY-MM-DD format. (When I need to write to a date field, I couple it with another function that converts YYYY-MM-DD to FM date format). This is useful when receiving date inputs from interfaces that don't validate or standardize the date format, or from ones that consistently supply the date in a particular non-ISO format.
It will accept inputs in the format YYYYMMDD, ####-##-##, #/#/####, ##/##/####, and many variants of these. The year must be the first or last component.
If the input string contains a letter or a space, it will only evaluate the portion that comes before that space or letter.
If the input string is invalid despite attempts to correct it (see 3rd bullet below), it will return the original value unaltered.
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.