php - Incorrect date format in Excel, while it's correct in CSV -


i exporting database table csv , when open in excel bump problem. column containing date , time shows different format. must have , pm symbols, because can seen on enclosed image cuts of , format changes (2 instead of 02)

enter image description here

the ugly csv without unnecessary columns:

"2013/02/13 20:23 pm" "2013/02/13 20:26 pm" "2013/02/13 23:27 pm" "2013/02/13 23:27 pm" "2013/02/14 01:01 am" "2013/02/16 22:50 pm" "2013/02/17 19:26 pm" "2013/02/21 01:19 am" "2013/02/26 04:27 am" "2013/02/27 01:03 am" "2013/02/28 04:53 am" "2013/02/28 04:53 am" "2013/02/28 04:53 am" "2013/03/01 03:54 am" "2013/03/06 04:23 am" "2013/03/06 04:23 am" "2013/03/10 10:27 am" "2013/03/10 10:35 am" "2013/03/10 10:39 am" "2013/03/10 10:48 am" "2013/03/10 23:25 pm" "2013/03/11 04:12 am" "2013/03/11 04:50 am" "2013/03/11 04:51 am" "2013/03/11 04:52 am" 

the date format doesn't make sense, maybe that's what's tripping excel.

it should either 21:44 or 9:44 pm. try without am/pm suffix, or convert hours 13-23 1-11.


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -