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 > how do we do date and time formats?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-30-04, 13:12
manth manth is offline
Registered User
 
Join Date: Mar 2004
Posts: 54
how do we do date and time formats?

Hi,

Here is my query and result

db2 => SELECT PUTDATE, COUNT(*) FROM DB2ADMIN.MQMDLOG WHERE PUTDATE BETWEEN '2004-03-29' AND '2004-03-30' GROUP BY PUTDATE

PUTDATE 2
---------- -----------
2004-03-29 9769
2004-03-30 5210

2 record(s) selected.

I want result like this

PUTDATE 2
---------- -----------
29/03/2004 9,769
30/03/2004 5,210

How do we get the above result??

I appreciate ur help?

Thanks
Reply With Quote
  #2 (permalink)  
Old 03-30-04, 13:28
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Re: how do we do date and time formats?

Quote:
Originally posted by manth


I want result like this

PUTDATE 2
---------- -----------
29/03/2004 9,769
30/03/2004 5,210

How do we get the above result??
Look up the CHAR() function in SQL Reference
Reply With Quote
  #3 (permalink)  
Old 03-30-04, 13:41
manth manth is offline
Registered User
 
Join Date: Mar 2004
Posts: 54
I did not find good material in the web.

Could you suggest me a good link
Reply With Quote
  #4 (permalink)  
Old 03-30-04, 13:54
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally posted by manth
I did not find good material in the web.

Could you suggest me a good link
http://www-3.ibm.com/cgi-bin/db2www/...bs.d2w/en_main
Reply With Quote
  #5 (permalink)  
Old 03-30-04, 14:43
manth manth is offline
Registered User
 
Join Date: Mar 2004
Posts: 54
Thumbs up

thanks for ur help
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