unix date format help needed?

Discussion in 'MySQL' started by designerz, Aug 14, 2007.

  1. #1
    Hi I need a unix date format for 01/01/2009, as i dont know how to show it its something like this i think

    1187022039

    Any help would be greatful, also how do i work this out myself

    Thanks
     
    designerz, Aug 14, 2007 IP
  2. gibex

    gibex Active Member

    Messages:
    1,060
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    95
    #2
    First you need to change the date format to Y-m-d to match mysql date style

    The code to run is:

     
    gibex, Aug 17, 2007 IP
  3. angelrabbit

    angelrabbit Guest

    Messages:
    54
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    good one.....
     
    angelrabbit, Aug 17, 2007 IP
  4. gibex

    gibex Active Member

    Messages:
    1,060
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    95
    #4
    I hope it helped.
     
    gibex, Aug 18, 2007 IP
  5. theartofennui

    theartofennui Active Member

    Messages:
    117
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    60
    #5
    once you have the timestamp in a variable such as this $timestamp...you can use the date() function in php to recieve the desired output.

    date("m-d-Y", $timestamp);

    hope that helps...
     
    theartofennui, Aug 18, 2007 IP