Results 1 to 4 of 4

Thread: [RESOLVED] Date format changes when saving Excel as csv

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Location
    Sevenoaks, UK
    Posts
    11

    Resolved [RESOLVED] Date format changes when saving Excel as csv

    I am having date formatting problems when saving an Excel file in csv format. The dates in the Excel spreadsheet are originally formatted as dd/mm/yy but after converting to a csv file the dates get changed to mm/dd/yy format.
    I can see no way of stopping this happening and worse I am not convinced that this always happens the same on all target machines.
    I am using MS Excel 2000.
    The conversion is being done by - wkb.SaveAs FileName:="Myfilename.csv", FileFormat:=xlCSV
    Does anyone have any ideas as to how I can gain control of the date format that ultimately appears in the csv file?
    Geoff

  2. #2
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Re: Date format changes when saving Excel as csv

    Moved to office development, might get more help there.

  3. #3
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950

    Re: Date format changes when saving Excel as csv

    When you format a cell in Excel (or a field in Access, for that matter), you're only formatting the appearance of data in that cell, not the actual value stored there. When you export the data (or use it in other ways), the actual stored value is exported.
    When you're in the cell, look at the value in the formula bar above the worksheet. That's the actual value.
    You'd have to either enter dates in Excel in the format you want manually (in which case their data type would be text), or format the values in the .csv file.
    Tengo mas preguntas que contestas

  4. #4

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Location
    Sevenoaks, UK
    Posts
    11

    Re: [RESOLVED] Date format changes when saving Excel as csv

    Many thanks for explaining this.
    I had not quite understood how csv files work.
    Geoff

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width