Date+Time

Discussion in 'PHP' started by alraaj2, Aug 8, 2008.

  1. #1
    i wanted date & time in gmt in php format. It should be like this
    August 8, 2008 - 16:34 GMT

    Please do it for me.
     
    alraaj2, Aug 8, 2008 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    nico_swd, Aug 8, 2008 IP
    nabil_kadimi likes this.
  3. YIAM

    YIAM Notable Member

    Messages:
    2,480
    Likes Received:
    240
    Best Answers:
    0
    Trophy Points:
    280
    #3
    
    echo date('F d, Y - G:i e');
    
    PHP:
     
    YIAM, Aug 8, 2008 IP
  4. jpinheiro

    jpinheiro Peon

    Messages:
    1,211
    Likes Received:
    15
    Best Answers:
    1
    Trophy Points:
    0
    #4
    
    <?php
    echo(date("F d, Y - G:i e"));
    ?>
    PHP:
     
    jpinheiro, Aug 8, 2008 IP
  5. guzz

    guzz Guest

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    you may not use "e" parameter below php5

    
    <?
    $gmt = substr(date("O"), 1,2);
    echo(date("F d, Y - G:i ").$gmt);
    ?>
    
    PHP:
     
    guzz, Aug 8, 2008 IP
  6. me4you

    me4you Well-Known Member

    Messages:
    1,989
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    155
    #6
    me4you, Aug 9, 2008 IP
  7. Hannaspice

    Hannaspice Active Member

    Messages:
    77
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #7
    <?php
    echo(date("F d, Y - G:i e"));
    ?>
    PHP:
    What is the type of this date field in my database? Thanks pro.
     
    Hannaspice, Dec 1, 2008 IP