You can use something like this in php:
date("F j, Y", time() - 60 * 60 * 24);
depending on the type of data in your database, you can change "F j, Y" in the format you need.
In mysql something like this:
CAST(NOW() - INTERVAL 1 DAY AS DATE).
source share