Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert from UNIX_TIMESTAMP to formatted date

Status
Not open for further replies.

paulbradley

Programmer
Oct 9, 2002
158
GB
I'm holding a UNIX_TIMESTAMP (say, 1110715984) and I would like a way of formatting this in MySql into a date and time.

Many thanks in advance.
 
The function you are looking for is FROM_UNIXTIME(unix_timestamp)
 
If you are trying to formt a date made with php and store it in a mysql timestap then retrieve it. I think that that might be a problem. Because I read that mysql timestamps are incompatible with php timestamps. I could be wrong tho.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top