process MySQL timestamp

The TIMESTAMP data type is used for values that contain both date and time parts. TIMESTAMP has a range of "1970-01-01 00:00:01" UTC to "2038-01-19 03:14:07" UTC.

$query = \"select UNIX_TIMESTAMP(date_field) as mydate from mytable where 1=1\";
$records = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($records))
{
    echo $row;
}