Results 1 to 3 of 3

Thread: CSV file dd/mm/yy format

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2003
    Posts
    232

    CSV file dd/mm/yy format

    I wrote a macro which takes an xls file and creates a csv file.
    everything is working fine. one problem i am having the date needs to be in dd/mm/yy format. i translate it to that format i even msgbox the value and it is correct. However when i display it in excel in the csv file it comes out as d/mm/yyyy format. I opened the csv in a text editor and it shows the date correctly. why is excel messing around with the date???
    any help with this would be appreciated.
    THANKS.

  2. #2
    PowerPoster
    Join Date
    Feb 2001
    Location
    Crossroads
    Posts
    3,046

    Re: CSV file dd/mm/yy format

    Originally posted by Shevy
    I wrote a macro which takes an xls file and creates a csv file.
    everything is working fine. one problem i am having the date needs to be in dd/mm/yy format. i translate it to that format i even msgbox the value and it is correct. However when i display it in excel in the csv file it comes out as d/mm/yyyy format. I opened the csv in a text editor and it shows the date correctly. why is excel messing around with the date???
    any help with this would be appreciated.
    THANKS.
    Very odd indeed. I just duplicated what you described. This has to be a bug in Excel ... although it displays the date wrong it doesnt change it when you save it as a csv from excel. I'd call it a bug ... after all excel shouldnt assume 5/5 from a csv file is a date ... it could mean something entirely different (5 of 5, 5 divided by 5, etc).
    Sorry I dont have a workaround ... looks like if you are going to use excel to view csv files that you are stuck with this ...

  3. #3
    Lively Member
    Join Date
    Jun 2003
    Location
    france
    Posts
    71
    maybe you could write an autostart macro which change the format of the cell each timeyou open the file

    just use the autorecording and right click on your cell and click format cell

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