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 > DB2 command remove the 'date' string from the timestamp.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-04-11, 09:09
shreeks01 shreeks01 is offline
Registered User
 
Join Date: May 2011
Posts: 1
DB2 command remove the 'date' string from the timestamp.



Hi,
What is the DB2 command to remove the 'date' string from the timestamp?
Ex input : 2011/04/15 14:17:10.000
Sample output : 04/15/2011
Could someone revert with an example? Thanks.
Reply With Quote
  #2 (permalink)  
Old 05-04-11, 09:44
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
If your column data type is timestamp and you want to return the date portion: date(column1).

Andy
Reply With Quote
Reply

Tags
date, db2, timestamp, timestamps

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