Is there an easy (single query) way to do this?
I'm reading those values from a column in a table and I think that the column itself is defined as a string (can't be helped, i'm afraid).
See Question&Answers more detail:osIs there an easy (single query) way to do this?
I'm reading those values from a column in a table and I think that the column itself is defined as a string (can't be helped, i'm afraid).
See Question&Answers more detail:osUse UNIX_TIMESTAMP
;
SELECT UNIX_TIMESTAMP('2007-11-30 10:30:19');
Update:
SELECT UNIX_TIMESTAMP(CAST(fieldName AS DATE));