![]() |
Re-formatting of dates from Excel to CSV
When I save an Excel worksheet as a CSV file the dates are re-formatted from
04/11/2004 to 4/11/2004 (British style Date ddmmyyyy). This doesnt happen immediately on saving but when the CSV file is closed and then reopened. Any suggestions how I can prevent it dropping the leading zero? Many thanks GLS -- GLS |
In a word, No!! All I can suggest is you reformat the cells when the file
is opened. I tried preceeding the date with a ' and Excel got shot of the ' AND the leading 0. The only other suggestion I have is to save as a TXT file and use the text import wizard to format the column as text, then the leading 0 remains but Excel doesn't recognize them as dates until you * by 1. Bit of a pain innit? Hth, Oli -- Message posted via http://www.officekb.com |
GLS,
It's probably writing the data to the csv as it appears in the sheet. It's the reopening with Excel that's using a different format. The next question is: Is the csv for some other application? If so, you're good to go. To see exactly what's in the csv, open it with NotePad, or any text editor. There's more on text files and Excel at www.smokeylake.com/excel. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "GLS" wrote in message ... When I save an Excel worksheet as a CSV file the dates are re-formatted from 04/11/2004 to 4/11/2004 (British style Date ddmmyyyy). This doesnt happen immediately on saving but when the CSV file is closed and then reopened. Any suggestions how I can prevent it dropping the leading zero? Many thanks GLS -- GLS |
All times are GMT +1. The time now is 10:01 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com