Hi,
Friday, February 20, 2004, 6:32:27 AM, you wrote:
JB> [snip]
JB> hi there
JB> how do i make php give me yesterday's date?
JB> i tried
JB> date("Y-m-d")-1
JB> but if today would be the 1st of july (2004-07-01), yesterday would be
JB> 00.
JB> july (2004-07-00) according to that calculator.
JB> is there any way to make this one get it right? without any
JB> if-structures if
JB> possible
JB> [/snip]
JB> http://www.php.net/strtotime
JB> --
JB> PHP General Mailing List (http://www.php.net/)
JB> To unsubscribe, visit: http://www.php.net/unsub.php
date('Y-m-d',strtotime('-1 day'));
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php