compare timestamp to curdate() mysql
Posted on 2010-09-06
I have a column that is of type "timestamp" in format of 2010-09-04 22:24:19 . I need to run a process where I check today's date against any records that have been created today already (marked by timestamp).
So essentially if i do select curdate(); it'll give me back 2010-09-06. I want to compare that to the timestamp to see if this is the same day (so ignore the hh:mm:ms).
I dont want to do substring(TS, 1,10 ) where I'll have 2010-09-04 and i'll be able to compare strings... I want to do a DATE comparison.
Is this possible somehow?