PHP and MySQL syntax: Difference between revisions

Jump to navigation Jump to search
No change in size ,  29 December 2014
m
Line 26: Line 26:
=== specified time ===
=== specified time ===
the '''human readable''' time format ex: 2010-12-21 10:05:06
the '''human readable''' time format ex: 2010-12-21 10:05:06
* php: echo date("y-m-d H:i:s", 1292897201 ); // Using [http://us3.php.net/manual/en/function.date.php date()] function that converting the time stamp 1292897201 to the human readable time format. similar: [http://us3.php.net/gmdate gmdate()] function {{access | date = 2014-04-30}}
* php: echo date("Y-m-d H:i:s", 1292897201 ); // Using [http://us3.php.net/manual/en/function.date.php date()] function that converting the time stamp 1292897201 to the human readable time format. similar: [http://us3.php.net/gmdate gmdate()] function {{access | date = 2014-04-30}}
* mysql:
* mysql:
** SELECT FROM_UNIXTIME( 1306311155 ); //convert the time stamp 1306311155 to the human readable time format 2011-05-25 08:12:11
** SELECT FROM_UNIXTIME( 1306311155 ); //convert the time stamp 1306311155 to the human readable time format 2011-05-25 08:12:11

Navigation menu