How can I convert the time value converted by php in mysql? The converted time through the php & nbsp; date function is stored in the mysql database 1391768710 & nbsp; this represents February 7, 2014 & nbsp; how can I get the time in mysql? what kind of time functions in mysql can be directly converted to the time format? For example, if my field is begintime & nbsp; table name: tab_informa, how can I convert the time value converted by php in mysql?
The time converted by the php date function is stored in the mysql database.
1391768710
This represents February 7, 2014.
How can I get this time in mysql?
What time functions can be directly converted into time formats in mysql?
For example, if my field is begintime, the table name is tab_information.
------ Solution --------------------
Unix_timestamp
------ Solution --------------------
Select from_unixtime (1391768710)
18:25:10
Select from_unixtime (1391768710, '% Y-% m-% d ')
2014-02-07
------ Solution --------------------
From_unixtime (unix_timestramp, format.
Unix_timestramp () converts time to timestamp.
------ Solution --------------------
From_unixtime (); 1391952085 to 21:21:25
Unix_timestamp (); 21:21:25 to 1391952085