#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Datetime CSV format

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Datetime CSV format

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.
--
David Biddulph

"kh" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove Time from DateTime [email protected] Excel Discussion (Misc queries) 5 September 18th 08 08:57 PM
pop up calendar using MS DateTime Picker andy62 Excel Worksheet Functions 4 June 19th 07 10:18 PM
MS Query DateTime String Dean Excel Worksheet Functions 1 January 23rd 06 12:07 PM
datetime format issues when linking access to excel Season Excel Discussion (Misc queries) 0 December 6th 05 04:52 PM
autodate and datetime stamp DC Gringo Excel Worksheet Functions 1 December 3rd 04 06:25 PM


All times are GMT +1. The time now is 04:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"