View Full Version : Problem exporting DATE fields from Access to Excel


SMG
05-09-2002, 07:18 AM
I have a problem exporting data from an Access table to an Excel spreadsheet via a query and the OutputTo method. For example, when exporting a date field containing 25/02/02 from Access, it appears on the spreadsheet as 25/02/02. However, Access will not accept this format when importing it back unless you click on the cell and then on the formula bar, which changes the cell contents to 25/02/2002. Access will now accept this data. Unless this is done on each cell, you get a type conversion error. Is there any way of reformatting the entire sheet without clicking each cell? I've tried just about every date format when exporting from Access but nothing works. You also get the same problem exporting and then importing 'number' fields.

The_Doc_Man
05-09-2002, 10:29 AM
Can you perhaps format the column?

Or the other possibility is when you are doing the import, there is an Advanced button associated with that wizard that lets you set the expected date format, and it includes the option for year to be 2 or 4 digits. That might be useful, too.

BLeslie88
05-09-2002, 10:35 AM
There is a way around it using the left, mid and right function... You can separate dd mm & yy and then concatenate them into the formatted date you need... Of course this would need to be done using a query to export the data and not just exporting off the table... Let me know if this helps at all....
Regards...