Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2003
    Posts
    2

    Unanswered: formatting a mysql timestamp

    Is this really the only way? I want my timestamp field, which is stored like:
    20031229121901

    to be displayed like:
    2003-12-29 12:19:01

    This is what I have, but I'm hoping for something simpler.
    SELECT FROM_UNIXTIME(UNIX_TIMESTAMP(time_stamp)) AS 'time'

  2. #2
    Join Date
    Oct 2003
    Location
    Denver, Colorado
    Posts
    137

    Re: formatting a mysql timestamp

    Try checking out the MySQL manual:
    http://www.mysql.com/doc/en/Date_and...functions.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •