I'm using PHPExcel to read the data, and then validating the data. Problem I'm getting is all the data is validating except I don't know how to check the array if it has a date or not. Problem is not a format, problem is I'm unable to find a way to check whether it is a date or another string or integer. These are one of my value in a date cell in Excel file. i.e ;
1/2/15 17:24
1/7/15 12:00
1/9/15 11:57
For each cell you can check if this is a date :
you have to check your current version of PHP because new functions are not available in old versions. Is you date format is fixed? if yes then there is function
checkdate ().
it returns true on valid date.http://php.net/manual/en/function.checkdate.php
Checks the validity of the date formed by the arguments. A date is considered valid if each parameter is properly defined.
My suggestion is,
explode()
1/2/15 17:24 data from excel and then pass it to thecheckdate()
function, if it returns true then this is "DATE" or this entire excel column contains DATE