Results 1 to 2 of 2

Thread: [RESOLVED] Compare Dates

  1. #1

    Thread Starter
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Resolved [RESOLVED] Compare Dates

    I'm trying to select only records in my database (mySQL) after a certain date but when I use the strtotime() function it returns the "time" in mm/dd/yyyy format where as I am working in dd/mm/yyyy format. How do I overcome this?

    PHP Code:
    //If you test the below code the $mytime will be greater then time() which is can't be??
    $mytime strtotime("09/03/2006");
    echo 
    "MyTime = $mytime and " time() ."<br>"

  2. #2
    Frenzied Member
    Join Date
    Aug 2005
    Posts
    1,042

    Re: Compare Dates

    lintz:

    I think you might want to use the Date_Format function?

    You can read about it in the manual at:

    http://dev.mysql.com/doc/mysql/searc...Fen%2F&lang=en

Posting Permissions

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



Click Here to Expand Forum to Full Width