Tip 4 : Microsoft Office Excel XML : Use the Correct DateTime Format to Avoid Error

The correct format for DateTime data type in an Excel XML cell is yyyy-MM-ddTHH:mm:ss.fff. Using other formats will give you an error of The file cannot be opened because of errors when you open the Excel xml file.

Sample code and value for the correct format:

Sample code and value for the incorrect format:

 

2 Comments

Comments have been disabled for this content.