Convertir datetime de mysql en unix timestamp usando php

echo(date('U',strtotime($string)));

One Response to “Convertir datetime de mysql en unix timestamp usando php”

  1. Diego Caro  on October 9th, 2009

    O bien podrías agregar UNIX_TIMESTAMP(colDate) en el select de mysql.

    Más info en http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_unix-timestamp

Leave a Reply