[UPHPU] Why do forums use Int(11) for dates?

Timothy Humphrey timothy.humphrey at gmail.com
Thu Apr 6 13:38:32 MDT 2006


TJ Hunter wrote:
> It unix timestamp format. In my opinion, is the easiest way to deal
> with dates with php+mysql.

FYI:
It's easy to go back an forth from a MySQL date and a Unix timestamp in 
PHP using a strtotime() function. [1] Hope thats helpful.


[1]
$mysql_date = date("Y-m-d");
$unix_timestamp = strtotime($mysql_date." 00:00:00");
$formatted_date = date("D. n/j", strtotime($mysql_date."10:00:00"));



More information about the UPHPU mailing list