View Single Post
  #1  
Old 04-27-2013, 06:55 AM
revloc02c's Avatar
revloc02c
Hill Giant
 
Join Date: Aug 2010
Location: UT
Posts: 215
Default How to convert timelaston to a date

In the character_ table is a column timelaston with a number which is the number of seconds since Jan 1, 1970. I was wondering how to convert this to a date, and finally found a way:

Code:
SELECT DATE_ADD('1970-01-01', INTERVAL character_.timelaston/86400 DAY) AS 'DateLastPlayed' FROM character_;
That's one way to get a date. Not sure how to include the time. Maybe someone else knows a better way.
Reply With Quote