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 > DB2 > Displaying Time

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-11-04, 10:28
ApoPen ApoPen is offline
Registered User
 
Join Date: Jul 2004
Location: Ottawa, Canada
Posts: 58
Displaying Time

Is there a function to display a timestamp in the format:

'2004/08/11 10:22:24 AM'

All i have found so far is:
varchar_format(current timestamp,'YYYY-MM-DD HH24:MIS')
Reply With Quote
  #2 (permalink)  
Old 08-11-04, 10:40
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
I believe that that is all that comes with DB2. You will need to write your own UDF to get what you want.

Andy
Reply With Quote
  #3 (permalink)  
Old 08-11-04, 10:44
Razor1973 Razor1973 is offline
Registered User
 
Join Date: Jul 2004
Posts: 53
Ain't that good enough?


Quote:
Originally Posted by ApoPen
Is there a function to display a timestamp in the format:

'2004/08/11 10:22:24 AM'

All i have found so far is:
varchar_format(current timestamp,'YYYY-MM-DD HH24:MIS')
Reply With Quote
  #4 (permalink)  
Old 08-11-04, 10:50
ApoPen ApoPen is offline
Registered User
 
Join Date: Jul 2004
Location: Ottawa, Canada
Posts: 58
unfortunatly not, we are doing a conversion from mySQL to DB2, but the presentation to the clients have to remain the same.
Reply With Quote
  #5 (permalink)  
Old 08-11-04, 14:41
dsusendran dsusendran is offline
Registered User
 
Join Date: Apr 2004
Location: Inside Intel
Posts: 165
See:
http://www.cs.ucla.edu/classes/winte...1/DB2Time.html

You might want to use them to write the UDF.

Newbie
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