PHPEXCEL DATETIME to be imported in MYSQL using phpexcel
Posted: Tue Feb 21, 2012 8:08 pm
Hi I'm having trouble finding how to read a value from a cell which is formatted as a date.
Can anyone help me out and point me in the direction of some sample code please?
Assumed below is my datetime in excel to be imported in database(MySQL) using PHP.
id startdatetime enddatetime Name
1 1988/02/02 09:22:02 1988/02/02 06:00:00 Jon
Below is the result in database.
id startdatetime enddatetime Name
1 0000:00:00 00:00:00 0000:00:00 00:00:00 Jon
I have understand that excel date format (YYYYMMDD His) for example is not recognizing the datetime of MysQL even the field type of startdatetime and enddatetime is set to DATETIME. can someone help me?
more thanks,
Can anyone help me out and point me in the direction of some sample code please?
Assumed below is my datetime in excel to be imported in database(MySQL) using PHP.
id startdatetime enddatetime Name
1 1988/02/02 09:22:02 1988/02/02 06:00:00 Jon
Below is the result in database.
id startdatetime enddatetime Name
1 0000:00:00 00:00:00 0000:00:00 00:00:00 Jon
I have understand that excel date format (YYYYMMDD His) for example is not recognizing the datetime of MysQL even the field type of startdatetime and enddatetime is set to DATETIME. can someone help me?
more thanks,