I want to convert a date in yyyy-mm-dd format to dayname, month day, year using php.
eg convert 2000-12-01 to Friday, December 1st, 2000.
Any suggestions?
| SitePoint Sponsor |


I want to convert a date in yyyy-mm-dd format to dayname, month day, year using php.
eg convert 2000-12-01 to Friday, December 1st, 2000.
Any suggestions?
Brian Smith
www.mylittlechampion.com





$date = "2000-12-11";
$temp = explode("-", $date);
$year = $temp[0];
$month = $temp[1];
$day = $temp[2];
print date ("l, F jS, Y", mktime (0,0,0,$month,$day,$year));
Please don't PM me with questions.
Use the forums, that is what they are here for.


Thanks Freddy, That was alot faster than figuring it out myself.
Brian Smith
www.mylittlechampion.com





Ah but you can't rely on others to always be there to answer your questions. mktime is a valuable tool and I would suggest that you play around with it a bit.
Please don't PM me with questions.
Use the forums, that is what they are here for.





Haha, since you're amazing in giving people soln!!Originally posted by freddydoesphp
Ah but you can't rely on others to always be there to answer your questions.![]()
- Son Nguyen
AdSpeed.com - Ad Serving and Ad Management Made Easy


I here ya Freddy but here's the situation. I know you didn't ask but you might find it amusing. Take 1 great internet idea (at least me and my partner think so. My wife too believe it or not)another job that pays the bills, 3 young kids (one 4 yr old sitting in front of me right now as I type), some but not a lot of knowledge about PHP, MySQL, Apache for Win32 (don't laugh, it works), HTML, FrontPage2000, Javascript, PhotoShop, MS Photo Draw. Kevin Yanks PHP/MySQL tutorial beside me finished but his and Thaul's Javascript tutorials printed and waiting to start, a half finsihed tutorial on PhotoShop and the site that's 75% complete with plans to be done by Christmas.
I'm not looking for sympathy. I'm having the time of my life. After coding mainframe applications for 17 years, this stuff is worth staying up late for.
But, because of all this, the date thing seemed a whole lot easier to figure out by asking on sitepoint rather than starting the research. After all, you answered back in less than 30 minutes. That commitment is very appreciated.
<Edited by sstaubin01 on 12-01-2000 at 11:05 PM>
Brian Smith
www.mylittlechampion.com





Oh I hear ya man! I like helping people when I can it helps me keep my skills up. BTW I am using PHP/MySQL and apache on win98 right now and yes it does work good. Of course not for real web serving, but for dev its great!
Please don't PM me with questions.
Use the forums, that is what they are here for.





Me too, I always hunt for easy posts to reply and left the
hard ones for freddy!!
Freddy, do PHP+MySQL on Win98 stable? I'd love to do so but it seems so difficult to setup!
- Son Nguyen
AdSpeed.com - Ad Serving and Ad Management Made Easy





I use it with Apache for windows and it was actually really to setup, If you want me to send you specific instructions as to how I did it , I will or maybe I will just post them here so everyone can enjoy.
Please don't PM me with questions.
Use the forums, that is what they are here for.
I'll second freddy on that one, I use PHP4 + Zend Optimizer, MySQL and Apache on Windows 98 and Win2k for all development work and it is really easy to setup and works brilliantly considering all the warning/disclaimers about Win32.
Just as a side note, anyone got PostgreSQL binaries for Win32? I don't want to have to compile it VC++ completely destroys my PC most of the time and I'm to busy to rebuild it all at the moment.
Karl Austin :: Profile :: KDA Web Services Ltd.
Business Web Hosting :: Managed Dedicated Hosting :: From £250/m
Personal Web Hosting :: Budget Web Hosting :: From £50/y
Call 0800 542 9764 today and ask about our Cloud Hosting Platform





Sure Freddy! Just search back for this thread and seeing such a helpful offer, who could resist?Originally posted by freddydoesphp
I use it with Apache for windows and it was actually really to setup, If you want me to send you specific instructions as to how I did it , I will or maybe I will just post them here so everyone can enjoy.Anyway, take you time, do whenever you feel bored!
![]()
- Son Nguyen
AdSpeed.com - Ad Serving and Ad Management Made Easy
Another solution for PHP on Windows that I highly recommend is Sambar Server. Its Web-based administration interface is excellent, and it includes an FTP and mail server, and a JSP/servlet engine in the deal -- all for free!
See this thread: http://www.sitepointforums.com/showt...?threadid=6117
Kevin Yank
CTO, sitepoint.com
I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
Baby’s got back—a hard back, that is: The Ultimate CSS Reference
Bookmarks