Richard Rodriguez Richard Rodriguez - 1 year ago 71
MySQL Question

MySQL select yesterday's date

If I have a date like this:

'2013-03-25'


And I want to write a MySQL query with
WHERE
is "yesterday", how do I do it?

Answer Source

A simple way to get yesterday's date is to use subdate() function:

subdate(currentDate, 1)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download