Datetime CSV format

K

kh

Hi. What rules does Excel employ when importing datetime values from CSV
files? From what I can work out CSV files containing datetime data in the
form "dd-MMM-yyyy HH:mm:ss" imports correctly, but I am unable to test this
on regionally configured machines so I cannot tell if this will always work.
For example, will time data always be treated as 24HR values?

I cannot find this documented anywhere.

Thanks
 
D

David Biddulph

Excel's interpretation will depend on the Windows regional options if the
data is ambiguous, but if there is an unambiguous interpretation Excel will
usually accept it. If you give it data with 12 hour times as hh:mm PM,
Excel will read them. If you don't have AM or PM they will be assumed to be
24 hour.

Remember that a CSV file is plain text, not numbers in Excel's date format.
If you want to control the formatting interpretation of the input of the CSV
to Excel, don't just open the CSV, but use Excel's Data/ Import External
Data, and the final stage of the text import wizard will give you the chance
to specify the date format of the input.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top