what is the data type of the field?
If it is int, then the date must be converted to integer before being stored. NOW() can return a string or an int depending on how it's being called.
When I need a timestamp in a table, I'll use datetime for the field type. The date gets entered using NOW() and when retrieved I either display it as YYYY-MM-DD HH:MM:SS or I convert it to int using strtotime then call strftime to reformat it.
echo strftime("%m-%d-%Y %H:%M:%S:",strtotime($Result['datefield']));
if you are being returned something like this: 20030110102626 you could use a series of substr() calls to extract the data. This question was posted earlier this week. Here's a function I wrote to handle that.
function reformatTS($tstamp,$format="u"){
$unix_stamp = strtotime(substr($tstamp,0,4) . "-" .
substr($tstamp,4,2) . "-" .
substr($tstamp,6,2) . " " .
substr($tstamp,8,2) . ":" .
substr($tstamp,10,2) . ":" .
substr($tstamp,12,2));
if($format == "u"){
return($unix_stamp);
} else if($format == "s") {
return(strftime("%m-%d-%Y %H:%M:%S",$unix_stamp));
}
}