Hi,
I have a number of dates in a excel spreadsheet, in the format 17-Jul ( for this month), is there anyway for me to convert this to mysql format?
Thanks in advance.
Hi,
I have a number of dates in a excel spreadsheet, in the format 17-Jul ( for this month), is there anyway for me to convert this to mysql format?
Thanks in advance.
If you are sure they are all for the current year (when the script is executed) this will work.
$date = '17-Jul';
$date = date('Y-m-d', strtotime($d . '-' . date('Y'))); //2010-07-17
However, if the cells are a date type and not plain text and you can edit the spreadsheet, you can probably change the date format in excel before you export.
thanks Cranial, thats perfect.