Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: ejonesThere seems to be a problem with converting "Mar 2, 2008" with the format "m D, CCYY". It has to do with the number of spaces between the three character month and the date. The D is supposed accept either a one or two digit date and I would expect it to accept an optional space instead of the first digit on a one digit date. March 2nd fails in the following input:
[code:1]
dstring:string
"Mar 26, 2008"
"Mar 2, 2008"
"Mar 3, 2008"
The work around I am using is the following which tries one format and if it fails it will try the other.
dconverted = try(dstring.date("m D, CCYY"), dstring.date("m D, CCYY"))
Note that the second format has two spaces between the m and D.