I found very similar questions like MySQL convert datetime to Unix timestamp , How to convert DATETIME to TIMESTAMP in mysql? related to this question. But I don't know how to apply those answers to my question...
I have a column (varchar type and I can't change the datatype to date because of some technical limitation of CMS I used) called "start_date" in Students table. Dates are displayed as YYYY-MM-DD
. I want to change them as timestamp .
I am looking something like,
UPDATE students SET start_date= convert_this_to_timestamp (start_date);
So basically I need to convert something like 2012-12-30
to 1356843600
using MySQL.