help with dates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shawn Northrop
    New Member
    • Jan 2007
    • 67

    help with dates

    I have a MySQL table with a date column (YYYY-MM-DD)
    I am selecting this and outputting it through PHP.
    Is there anyway to output it as MM-DD-YYYY ?
    Also can i out put the MM as Jan Feb Mar... etc.
  • billkirim
    New Member
    • Nov 2006
    • 25

    #2
    Originally posted by Shawn Northrop
    I have a MySQL table with a date column (YYYY-MM-DD)
    I am selecting this and outputting it through PHP.
    Is there anyway to output it as MM-DD-YYYY ?
    Also can i out put the MM as Jan Feb Mar... etc.
    [PHP]
    $new_timestamp = strtotime($row['date']);
    $r_date = date ("m-d-Y", $new_timestamp) ;
    echo $r_date;
    [/PHP]

    Comment

    • billkirim
      New Member
      • Nov 2006
      • 25

      #3
      Originally posted by billkirim
      [
      ][PHP]
      $new_timestamp = strtotime($row['date']);
      $r_date = date ("M-d-Y", $new_timestamp) ;
      echo $r_date;
      [/PHP]
      This is for MM= Jan,Feb etc.

      Comment

      • Shawn Northrop
        New Member
        • Jan 2007
        • 67

        #4
        awsome exactly what i needed,
        thanks

        Comment

        Working...