$lastmonth = mktime(0, 0, 0, date("m")-1, date("d"), date("Y"));
WIth the following
PHP Code:
$lastmonth = mktime(0, 0, 0, date("m")-3, date("d"), date("Y"));
how can I return the result as 2004-11-05?
Re: $lastmonth = mktime(0, 0, 0, date("m")-1, date("d"), date("Y"));
Have a look at the date function:
PHP Code:
$forrmated = date('$Y-$m-$d', $lastmonth);
Re: $lastmonth = mktime(0, 0, 0, date("m")-1, date("d"), date("Y"));
Re: $lastmonth = mktime(0, 0, 0, date("m")-1, date("d"), date("Y"));
Dont forget to change the icon of your first post to a http://www.vbforums.com/images/icons/completeclear.gif so other people can see its resolved. :wave:
Re: $lastmonth = mktime(0, 0, 0, date("m")-1, date("d"), date("Y"));