Re: change date format in MYSQL
Posted by:
Aftab Khan
Date: March 30, 2009 02:51AM
If your application use PHP then solution is to store the dates in DATETIME fields and use PHPs date() and strtotime() functions to convert between PHP timestamps and MySQL DATETIMEs. The methods would be used as follows -
$mysqldate = date( 'Y-m-d H:i:s', $phpdate );
$q="insert into t1 (....,date) values(....,$mysqldate)";
$phpdate = strtotime( $mysqldate );
Subject
Written By
Posted
December 18, 2006 02:56AM
December 18, 2006 09:34AM
December 18, 2006 11:39PM
December 19, 2006 09:56AM
December 21, 2006 02:12AM
February 08, 2008 10:53PM
February 01, 2009 12:39PM
Re: change date format in MYSQL
March 30, 2009 02:51AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.