Page 1 of 1
Trouble with date function
Posted: Fri Jun 09, 2006 5:20 pm
by Milan
I am trying to display the date in this format
mm/dd/yyyy hh:mm:ss
but with no luck, anyone has expirience with formating the date function?
Posted: Fri Jun 09, 2006 5:28 pm
by Oren
Posted: Fri Jun 09, 2006 5:31 pm
by Milan
Cool , thanks!
Mistake was not placing the formating in the ""
like
ohhh man
Posted: Fri Jun 09, 2006 5:57 pm
by Milan
Now the main question , how can i display a date that's 7 days from now?
Code: Select all
print(date("m/d/Y H:i:s",mktime(0,0,0,0,(0 + 7),2006)));
i cant figure out how to do it with mktime()
Re: ohhh man
Posted: Fri Jun 09, 2006 6:04 pm
by Oren
Milan wrote:i cant figure out how to do it with mktime()
Then don't
Code: Select all
echo date("m/d/Y H:i:s", strtotime("+1 week"));
Posted: Fri Jun 09, 2006 6:05 pm
by Milan
WOW!
hat's off!
thanks!