Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date Format problem
Hi,
I am using a macro to open a csv file, make some changes then save it. I'm using ActiveWorkbook.SaveAs FileFormat:=xlCSVWindows ActiveWorkbook.Close SaveChanges:=True to save the file. The problem is, some of the data (which I'm not changing) is dates, eg 15/02/2005 this appears in the saved file as 2/15/2005. I've checked my International settings and they're all UK so I don't know what's wrong. I've tried different file formats. I just want the date to remain unchanged. Thanks in advance for your help. Regards SW |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date Format problem
Under 'Customise Regional Options' is the short date format actually set to
dd/MM/yyyy ? Peter Bircher "SW" wrote in message ... Hi, I am using a macro to open a csv file, make some changes then save it. I'm using ActiveWorkbook.SaveAs FileFormat:=xlCSVWindows ActiveWorkbook.Close SaveChanges:=True to save the file. The problem is, some of the data (which I'm not changing) is dates, eg 15/02/2005 this appears in the saved file as 2/15/2005. I've checked my International settings and they're all UK so I don't know what's wrong. I've tried different file formats. I just want the date to remain unchanged. Thanks in advance for your help. Regards SW |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date Format problem
Yes, it is.
That's what baffles me. "Pete" wrote in message ... Under 'Customise Regional Options' is the short date format actually set to dd/MM/yyyy ? Peter Bircher "SW" wrote in message ... Hi, I am using a macro to open a csv file, make some changes then save it. I'm using ActiveWorkbook.SaveAs FileFormat:=xlCSVWindows ActiveWorkbook.Close SaveChanges:=True to save the file. The problem is, some of the data (which I'm not changing) is dates, eg 15/02/2005 this appears in the saved file as 2/15/2005. I've checked my International settings and they're all UK so I don't know what's wrong. I've tried different file formats. I just want the date to remain unchanged. Thanks in advance for your help. Regards SW |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date Format problem
I cured this by putting a line in the code to format the date on each row
into the format I wanted. (It was already in that format to start with, but hey! it works.) SW "Pete" wrote in message ... Under 'Customise Regional Options' is the short date format actually set to dd/MM/yyyy ? Peter Bircher "SW" wrote in message ... Hi, I am using a macro to open a csv file, make some changes then save it. I'm using ActiveWorkbook.SaveAs FileFormat:=xlCSVWindows ActiveWorkbook.Close SaveChanges:=True to save the file. The problem is, some of the data (which I'm not changing) is dates, eg 15/02/2005 this appears in the saved file as 2/15/2005. I've checked my International settings and they're all UK so I don't know what's wrong. I've tried different file formats. I just want the date to remain unchanged. Thanks in advance for your help. Regards SW |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Format Problem - Date Overrides Format | Excel Discussion (Misc queries) | |||
Date Format Problem | Excel Discussion (Misc queries) | |||
Date Format Problem | Excel Discussion (Misc queries) | |||
Date Format Problem | Excel Programming | |||
Date format problem | Excel Programming |