I have a text file with format mmm-yy (all months are 3 letter abbrev, e.g. Jan, Feb, Mar)
May-31
Which means, “May, 1931”.
If I use the following in a query:
CDate([BIRTHDT])
I get May 31, 2012, instead of May 1, 1931. The other rows, which have years that are later, like May-32, give the desired result of May 1, 1932. Obviously this has to do with the ms-access text to date conversion function mmm-dd validity checking having higher priority over the likely less common mmm-yy format, but it gives unexpected results in this case.
So somehow I need to extract month from the first 3 chars, year from last 2 digits, and combine them. Ideally I’d like to do this all within MS Access SQL.
“I need to extract month from the first 3 chars, year from last 2 digits, and combine them. Ideally I’d like to do this all within MS Access SQL.“
Here is a session in the Immediate window.
So you could use that expression in a query.