Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
How did you verify this?
Did you open the file in a text editor (like NotePad)? When I did save dates as a text file, the format of the date was saved: dmy or mdy or ymd or.... But if I wasn't careful when I reopened in Excel--not NotePad, then excel would use my pc's short date format for anything that looked like a date. 9/12/2005 was brought in as September 12, 2005--even though the original file had a value of December 9, 2005. I could use the text import wizard and tell excel how to treat that field, however. Rob wrote: Hi, Can someone please help me with a date formatting problem. When I save a sheet to a TXT file manually (using the SaveAs option, etc.), I have no problems and the dates remain as they are shown on the sheet as d/m/yy (eg 15/9/05), but when I use the following macro, the dates on that sheet are saved to the text file as month/day/year (eg 9/15/05) Sub ExportToMYOB() ActiveWorkbook.Save Sheet2.SaveAs Filename:="C:\Premier9\Data files\ExportToMYOB.txt", _ FileFormat:=xlText, CreateBackup:=False ActiveWindow.Close End Sub Why is it so? Rob -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Issues with saving text file | Excel Worksheet Functions | |||
Improrting Text file to a matrix when things are not constant. | Excel Worksheet Functions | |||
Exporting excel to text file | Excel Discussion (Misc queries) | |||
saving excel file as tab delimited | Excel Discussion (Misc queries) | |||
Hyperlink to specific sheet in Excel Web File | Links and Linking in Excel |