I got date, stored in MySQL column like this: 09-11-2012 (format is DD/MM/YYYY), but when I do:
SELECT UNIX_TIMESTAMP(t.date) FROM table t;
It does returns 0 for every single row.
How can I convert this format date to the unix timestamp? I would like to convert this date just like the PHP’s strtotime is doing it.
I guest
t.dateis a string right? try converting it toDATEfirst usingSTR_TO_DATE