My problem is Excel2002 changing the dd/mm/yyy format to mm/dd/yyyy when loading a text file.
Given the txt file (format dd/mm/yyy);
Time
1/01/1971 23:53
2/01/1971 0:05
I can’t come up with any VBA code to open the file so it has the correct date values (25934.995, 25935.003).
I’ve tried the following macro.
It converts the file to
Time
1/01/1971 23:53
1/02/1971 0:05
,swapping the days and months.
I can manually open the file correctly, but when I record this and play it the code swaps the days and months.
I don’t have this problem in Excel2000.
My regional short date format is d/MM/yyyy.
Any ideas?
Given the txt file (format dd/mm/yyy);
Time
1/01/1971 23:53
2/01/1971 0:05
I can’t come up with any VBA code to open the file so it has the correct date values (25934.995, 25935.003).
I’ve tried the following macro.
Code:
Workbooks.OpenText Filename:= _
"C:\ \ADCoutputd.txt", FieldInfo:=Array(1, xlDMYFormat)
Time
1/01/1971 23:53
1/02/1971 0:05
,swapping the days and months.
I can manually open the file correctly, but when I record this and play it the code swaps the days and months.
I don’t have this problem in Excel2000.
My regional short date format is d/MM/yyyy.
Any ideas?