Results 1 to 7 of 7
  1. #1
    TAM is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2015
    Posts
    22

    Export Report to Excel - Date Formats do not carry through -- how to fix it?

    My report displays the date as mm/dd/yyyy but when I choose the option to export the report to excel, the date is displayed as 21-Jan-15. How do I fix that?

  2. #2
    Phred is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2009
    Posts
    246
    Do the dates, after export, look correct, even though they are a different format? If so you should be able to select the range of cells in Excel with the dates and select the correct Excel format that you want. However, that would mean doing this one extra step each time you export the report. Remember the format is a "mask" and not an actual part of the data. Excel reads the field and guesses what the data is and tries to apply Excel's best guess as to format. Let me know how it goes.

    Phred

  3. #3
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,368
    Also, Excel refers to your regional settings when deciding what the data type is for a cell value, thus how to display it. In a new workbook, type in 3 cells 01/21/2015; 21/01/2015; 21-Jan-15 then click on each cell (one at a time) and check the cell format. You will probably find that only the last one is a date, while the others are custom or general. You control this in your regional settings, and the format you are seeing is the last in the list on my pc. I think you can control this with VBA automation or do it manually like Phred says.

  4. #4
    Phred is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2009
    Posts
    246
    Tam is listed as a novice so I think VB is not going to help out unless Tam has significant help. I also find it difficult to control Excel's formatting from within another program. I think manually is the only answer, as cumbersome as it might be. Anyone else have any ideas? Sorry Tam.

  5. #5
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,368
    I think you can control this with VBA automation...

    I may have mis-lead readers. I didn't mean control the regional settings, just the format of the data being written via automation - not an easy task for a novice for sure, as you say. However, unless one is stuck with the dd-mm-yy setting, why not change it? A 2 digit date format is a poor choice anyway, AFAIC.

  6. #6
    Phred is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2009
    Posts
    246
    Tam, we have not heard anything from you, so I am not going to respond any further. One other possibility exists. Does the report have to be in Excel? If not, you may have more success exporting/saving it out as a PDF. I have no experience with this but it is worth investigating.

    Phred

  7. #7
    TAM is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2015
    Posts
    22
    Quote Originally Posted by Phred View Post
    Tam, we have not heard anything from you, so I am not going to respond any further. One other possibility exists. Does the report have to be in Excel? If not, you may have more success exporting/saving it out as a PDF. I have no experience with this but it is worth investigating.

    Phred
    Sorry - new to this forum, so wasn't sure I needed to respond back. The report does need to be in EXCEL. Until I get a bit more skilled, I'll manually update in EXCEL or create a quick macro to do that.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 7
    Last Post: 04-18-2014, 05:26 PM
  2. Import from Excel file fails because of date formats
    By wardw in forum Import/Export Data
    Replies: 1
    Last Post: 01-01-2014, 02:20 AM
  3. Export Report to Excel without Date() and Time()
    By agent- in forum Import/Export Data
    Replies: 5
    Last Post: 12-21-2011, 08:55 AM
  4. Import Excel and date formats
    By thart21 in forum Import/Export Data
    Replies: 1
    Last Post: 04-19-2011, 03:49 PM
  5. Access date export to excel
    By jituknows in forum Access
    Replies: 1
    Last Post: 02-05-2011, 01:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums