Convert Integer Dates to DateTime format

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Locked
vmp
Posts: 99
Joined: Wed Jun 20, 2007 3:41 am

Convert Integer Dates to DateTime format

Post by vmp »

I am a newbie at PHP and MYSQL and I'm working on a custom query.

I have noticed that all dates in the TimeTrex DB are setup as integers.

Would you post a sample MySQL query to retrieve the date in a regular date/time format (e.g. DD-MON-YYYY)?
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Code: Select all

mysql> select FROM_UNIXTIME(created_date) as created_date from users limit 1;
+---------------------+
| created_date        |
+---------------------+
| 2007-06-26 17:24:07 |
+---------------------+
1 row in set (0.02 sec)
vmp
Posts: 99
Joined: Wed Jun 20, 2007 3:41 am

Post by vmp »

Thank you very much
Locked