I have an import procedure that formats a date to yyyy-mm-dd from a spreadsheet. I get dates globally so I don't know if it is a translation issue. The date is imported into a table and then formatted. From the FAQ file:
FAQ68-5827: Why do Dates and Times seem to be so much trouble?
It says the date will be converted in Excel to a number representing the days from 1-1-1900 with 1 being 1-1-1900.
The date comes in as a 1 but is converting to 12-31-1899. I use SQL to convert it:
DoCmd.RunSQL "UPDATE HACM_Export SET HACM_Export.dAccept = Format([HACM_Export].[dAccept],'yyyy-mm-dd');"
and it gives me 1899-12-31.
I also use SQL to update anything less than 1-1-1911:
DoCmd.RunSQL "UPDATE HACM_Export SET HACM_Export.dAccept = #1900-01-01# WHERE (((HACM_Export.dAccept) Is Not Null And ([HACM_Export].[dAccept])<=#1/1/1911#));"
This does not update the 12-31-1899 to 1900-01-01 either.
Anyone have any ideas?
FAQ68-5827: Why do Dates and Times seem to be so much trouble?
It says the date will be converted in Excel to a number representing the days from 1-1-1900 with 1 being 1-1-1900.
The date comes in as a 1 but is converting to 12-31-1899. I use SQL to convert it:
DoCmd.RunSQL "UPDATE HACM_Export SET HACM_Export.dAccept = Format([HACM_Export].[dAccept],'yyyy-mm-dd');"
and it gives me 1899-12-31.
I also use SQL to update anything less than 1-1-1911:
DoCmd.RunSQL "UPDATE HACM_Export SET HACM_Export.dAccept = #1900-01-01# WHERE (((HACM_Export.dAccept) Is Not Null And ([HACM_Export].[dAccept])<=#1/1/1911#));"
This does not update the 12-31-1899 to 1900-01-01 either.
Anyone have any ideas?