Asim Zaidi
Asim Zaidi

Reputation: 28284

select todays date to get the record

I am writing a cron job that will need to pull out the current days records. In my table I have a column called modify_date which is a unix time stamp, in format of 1/29/2011 9:59:47 AM

What would be the sql for the current date so it chooses the date part only and give current dats results accordingly. thanks

Upvotes: 0

Views: 1586

Answers (2)

shankhan
shankhan

Reputation: 6571

you can have a check

   WHERE data > '1/29/2011 00:00:01' and date < '1/29/2011 23:59:59'

Upvotes: 0

Shakti Singh
Shakti Singh

Reputation: 86336

SELECT * FROM table1  WHERE DATE(modify_date) = CURDATE();

Upvotes: 3

Related Questions