If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > formatting a mysql timestamp

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-07-04, 17:57
Samadi28 Samadi28 is offline
Registered User
 
Join Date: Nov 2003
Posts: 2
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'
Reply With Quote
  #2 (permalink)  
Old 01-08-04, 00:34
aus aus is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On