Thread: date format

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Posts
    1
    Rep Power
    0
    hi, sorry for my english i'm french
    i have a problem with date (french date hehe =o) )
    in a web form i have a date with this format dd/mm/yyy and in my mysql database format is yyyy-mm-dd , i want the web form with dd/mm/yyy how can i translate this format to mysql format ...?

    tx
  2. #2
  3. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    England, UK
    Posts
    83
    Rep Power
    14
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    $date = 'dd/mm/yyyy'; /* THIS IS THE DATE FROM THE FORM */

    $date = explode("/", $date);

    echo $date[2], '-', $date[1], '-', $date[0];
    [/code]

    ------------------
    Girish Gupta
    MusicGoesOn.com

IMN logo majestic logo threadwatch logo seochat tools logo