How do I convert a date 12 September 2003 to the day of the year?? I know that if I use date("z") that it will give me current day of the year but I need to convert find out how to convert that day to the long date and vice versa.
Thanks
convert date
Moderator: General Moderators
- andre_c
- Forum Contributor
- Posts: 412
- Joined: Sun Feb 29, 2004 6:49 pm
- Location: Salt Lake City, Utah
Try something like this:
if you want the 'day of the year' you will probably have to do some more calculations. If it's from a mysql database, I believe that you can that format using the date/time functions in the mysql manual
Code: Select all
date('d', strtotime('12 September 2003'))