Reputation: 4487
I am using ms excel 2007. and i convert one excel sheet which has date column in the format (DD/MM/YYYY)
for example. 30/11/2014
when i convert this excel sheet to csv
, the csv file the date column data changed like (MM/DD/YYYY)
. 11/30/2014
I am using the following coding to convert excel to csv.
xlSheet.SaveAs("sheet1.csv",
FileFormat:=Microsoft.Office.Interop.Excel.XlFileFormat.xlCSV,
Local:=True, ReadOnlyRecommended:=True)
(But it is worked correctly in system which has excel 2010 version.) Can Anyone Help me what's going wrong with this?..
Upvotes: 0
Views: 2696
Reputation:
This happens because of the Region Settings on your machine. If you go to Control Panel and change region setting to output date in dd/mm/yyyy format then you should be able to save date in desired format in .CSV. When you go to export data from excel it looks in region setting to get format for date field.
Upvotes: 3