How do I create a unix timestamp in MySQL? I know the type is set to INT
and value is NULL
but I need it to populate with current time in the format like: 1343782742
use UNIX_TIMESTAMP(date)
SELECT UNIX_TIMESTAMP(NOW())
SQLFiddle Demo
UNIX_TIMESTAMP
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With