MS Access – Formatting a date into mySQL-friendly format (YYYY-MM-DD)

I tried to export data including dates from Access and import it into mySQL. MySQL didn’t like the dates, and changed them all to something weird like “1979-01-01.”

To fix this, before exporting the data in Access change the date fields in the export query to read as such:

nameOfDate: Format(DateValue,”YYYY-MM-DD”)

Change “nameOfDate” to something more descriptive, i.e. “sellByDate” or “dateOfEntry.”

Leave a Reply