Translating date from timestamp

Discussion in 'PHP' started by Kain, Sep 4, 2008.

  1. #1
    How do you change the format of the date displayed when you use date("F j, Y, g:i a") to translate a timestamp.

    It currently displays it as August 11, 2008, 4:50 pm

    I want it to display as August 11, 2008 at 4:50 pm

    Thanks
     
    Kain, Sep 4, 2008 IP
  2. Kurg

    Kurg Member

    Messages:
    260
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    33
    #2
    replace the comma after the year with the word "at" and it should work just fine.
     
    Kurg, Sep 4, 2008 IP
  3. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #3
    just insert slashes
    double slashes beacause a and t has a value under the date function
    single slash if it doesnt.

    echo date("F j, Y \\a\\t g:i a");
     
    bartolay13, Sep 4, 2008 IP
  4. Kain

    Kain Peon

    Messages:
    58
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Worked perfectly

    Thanks
     
    Kain, Sep 4, 2008 IP