I have googled extensively, seen various stackoverflow solutions, but none work here. Not sure why. Help would be great!
The date is stored in a smalldatetime field in MSSQL. The value of this is seen as "2015-11-27 00:00:00". This seems the same format as a date in mySQL. The example below works if the value is pasted in, but not the value from the recordset.
//gives correct result, 11/27/2015
$TravDate = date("m/d/Y", strtotime("2015-11-27 00:00:00"));
//gives wrong result, 12/31/1969
$TravDate = date("m/d/Y", strtotime($obj->TravDate));
TravDateDump=".var_dump($obj->TravDate); and this gave no value for the field. All other non-date database fields gave values. In Studio Express the value can be seen as 2015-11-27 00:00:00. So problem is definitely extracting this value into PHP. – Paul Aug 28 '15 at 20:34