SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    SitePoint Addict sstaubin01's Avatar
    Join Date
    Nov 2000
    Location
    Ont, Canada
    Posts
    234
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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?

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    $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.

  3. #3
    SitePoint Addict sstaubin01's Avatar
    Join Date
    Nov 2000
    Location
    Ont, Canada
    Posts
    234
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Freddy, That was alot faster than figuring it out myself.

  4. #4
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  5. #5
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by freddydoesphp
    Ah but you can't rely on others to always be there to answer your questions.
    Haha, since you're amazing in giving people soln!!
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy

  6. #6
    SitePoint Addict sstaubin01's Avatar
    Join Date
    Nov 2000
    Location
    Ont, Canada
    Posts
    234
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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>

  7. #7
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  8. #8
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  9. #9
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  10. #10
    SitePoint Wizard silver trophy Karl's Avatar
    Join Date
    Jul 1999
    Location
    Derbyshire, UK
    Posts
    4,411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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
    Call 0800 542 9764 today and ask how we can help your business grow.

  11. #11
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.
    Sure Freddy! Just search back for this thread and seeing such a helpful offer, who could resist? Anyway, take you time, do whenever you feel bored!
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy

  12. #12
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •