Reputation: 6649
Am trying to get the timestamp of previous day midnight
That is if today is thursday , get the timestamp of wednesday midnight.
How do i go about this
i have tried
$lastdaymidnight = strtotime() //am stuck
What do i need to add to strtotime?
Upvotes: 0
Views: 2737
Reputation: 834
try this
$date = new DateTime();
$date->setTimestamp(strtotime('yesterday midnight'));
Upvotes: 7