Hi All,
Is there a way in php where i can create a variable with the current date in, in the format dd/mm/yyyy?
Is ther some command or something?
Thanks
[man]date()[/man]
Hi,
i saw this command on the link you gave me:
$today = date("m.d.y"); // 03.10.01
Is there any way i can use -'s or /'s to separate e.g.
dd-mm-yyyy
or
dd/mm/yyyy
Yes.
Just give it a try before asking.
For dd-mm-yyyy just change the dots (.) to dashes (-) it to: $today = date("m-d-y");
Then to get a four digit year, use the capital "Y" $today = date("m-d-Y");
Here is a link you might want to check out: http://us4.php.net/manual/en/function.date.php
It has a list of the format characters for the date function.
Originally posted by cyberRobot Here is a link you might want to check out: http://us4.php.net/manual/en/function.date.php It has a list of the format characters for the date function.
Did you try clicking the link in my post?
Originally posted by piersk Did you try clicking the link in my post?
Sorry, for some reason I didn't see the link. :o