revloc02c
04-27-2013, 06:55 AM
In the character_ table is a column timelaston with a number which is the number of seconds since Jan 1, 1970 (http://www.eqemulator.org/forums/showpost.php?p=202365&postcount=7). I was wondering how to convert this to a date, and finally found a way:
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.
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.