|
-
Feb 5th, 2005, 02:15 AM
#1
Thread Starter
Lively Member
$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?
Last edited by JamesNZ; Feb 6th, 2005 at 04:50 AM.
-
Feb 5th, 2005, 03:56 AM
#2
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);
-
Feb 5th, 2005, 04:28 AM
#3
Thread Starter
Lively Member
Re: $lastmonth = mktime(0, 0, 0, date("m")-1, date("d"), date("Y"));
Thanks - that worked
-
Feb 6th, 2005, 04:39 AM
#4
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 so other people can see its resolved.
-
Feb 6th, 2005, 04:52 AM
#5
Thread Starter
Lively Member
Re: $lastmonth = mktime(0, 0, 0, date("m")-1, date("d"), date("Y"));
Done
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|