How to convert DateTime to a number in MySQL?
Answers
Answered by
0
UNIX_TIMESTAMP(CONVERT_TZ(datetime, '+00:00', @@session.time_zone))
or:
TIMESTAMPDIFF(SECOND,'1970-01-01 00:00:00',datetime)
Similar questions