jwk811 Posted May 16, 2009 Share Posted May 16, 2009 $yesterday = date('Y-m-d H:i:s', mktime(0,0,0, date('m'), date('d') - 1, date('Y'))); this gets a date like this 2009-12-12 00:00:00 how can i show the time too. i want yesterday exactly. it only worked with an error Warning: Wrong parameter count for mktime() in /home/content/p/o/k/pokher366/html/members/library/functions.php on line 132 that was when i added another 0 and put date(H) at the end Quote Link to comment https://forums.phpfreaks.com/topic/158418-solved-mktime-and-date/ Share on other sites More sharing options...
Daniel0 Posted May 16, 2009 Share Posted May 16, 2009 $yesterday = date('Y-m-d H:i:s', strtotime('-1 day')); Quote Link to comment https://forums.phpfreaks.com/topic/158418-solved-mktime-and-date/#findComment-835466 Share on other sites More sharing options...
jwk811 Posted May 16, 2009 Author Share Posted May 16, 2009 thank you Quote Link to comment https://forums.phpfreaks.com/topic/158418-solved-mktime-and-date/#findComment-835471 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.