date conversion

date conversion

neil watson གིས-
Number of replies: 3

Hi,

looking at the last asccess date in MYSQL, how do I convert it to something more meaningful? What format is this?

 1201016302

cheers,

neil

དཔྱ་སྙོམས་ཀྱི་སྐུགས་ཚུ།: -
In reply to neil watson

Re: date conversion

Petr Kalis གིས-
Hi
It's UNIX timestamp (total seconds from year 1970,forgot the details wink).
Try this (for sql queries) http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_from-unixtime
(or userdate() in moodle code)
PK
In reply to neil watson

Re: date conversion

Joseph Rézeau གིས-
Core developers གི་པར Particularly helpful Moodlers གི་པར Plugin developers གི་པར Testers གི་པར Translators གི་པར
Hi Neil,
Use Convert Unix timestamp to Readable Date/time
For instance your 1201016302 unix timestamp date is = Tue, 22 Jan 2008 15:38:22 GMT
Joseph