I'm trying to export some fields to an Excel spreadsheet from a table using a query. The table contains some date fields formatted in an unusual manner. The Birthday field is formatted to show the month and day. The DateJoined field displays the month and year. The resulting spreadsheet displays these fields as unformatted numbers. For the Birthday, instead of 10/25 it displays 1025. For the date joined, instead of 8/1993 it displays 81993. Is there a way to format these fields so they show up as properly formatted date fields in the resulting spreadsheet?
In the table the Birthday field is defined as date/time, format m/d, mask ##/##. The DateJoined field is defined as date/time, format m/yyyy, mask ##/####.
The VBA code for exporting is:
varName = "c:\Members XL\Members.xls"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qryMembers2", varName
Any help is appreciated.