|
-
May 26th, 2006, 05:52 AM
#1
Thread Starter
New Member
[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?
-
May 27th, 2006, 07:56 AM
#2
<?="Moderator"?>
Re: Date format changes when saving Excel as csv
Moved to office development, might get more help there.
-
May 27th, 2006, 08:13 AM
#3
Frenzied Member
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
-
May 29th, 2006, 05:52 AM
#4
Thread Starter
New Member
Re: [RESOLVED] Date format changes when saving Excel as csv
Many thanks for explaining this.
I had not quite understood how csv files work.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|