Calculate unix timestamp in mysql - Mysql Views : 1328
Tagged in : Mysql
Send mail vote down 0 vote down 0
Unix Timestamp:


To calculate date/time in unix timestamp in mysql,

mysql> SELECT UNIX_TIMESTAMP();


It results,

UNIX_TIMESTAMP()

1217344347


It will display the unix timestamp value for the current date/time.

To convert the given date/time to unix timestamp,
In mysql prompt type,


mysql> SELECT UNIX_TIMESTAMP('2008-05-22 05:25:45');


It results,

UNIX_TIMESTAMP('2008-05-22 05:25:45')

1211414145
By - Ramya, On - 2008-07-29




    Login to add Comments .