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 > time field without seconds

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-18-04, 00:55
mailtome mailtome is offline
Registered User
 
Join Date: Dec 2004
Posts: 7
time field without seconds

Hi
I want a time field without seconds i.e only HH:MM.
How can this be done??If not the how can I only extract the hours and minutes?
Thanks
Reply With Quote
  #2 (permalink)  
Old 12-18-04, 05:23
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,262
Have a look at the MySQL date & tme functions int he help file- time_format may do what you want.

However unless you are doing some form of processing based on time then I'd of thought the natural place for this functionality would be some form of formatting within the display system. Ie some form of function / format in the application, whether that be PHP, C++, ASP etc.

In a vb environment it would be format([mytime],"HH:MM")
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