Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

db2 date

Status
Not open for further replies.

PatelRam

Programmer
Aug 20, 2003
87
US
Hi,

How do I write following code in db2.

select
to_char(calendar.business_start ,'Mon DD,YYYY')
AS mtd_bgn_date
from dual

Thanks,


 
PatelRam,

what are you expecting the resultant output to look like. Incidenttaly SYSIBM.SYSDUMMY1 is a good equivalent for the Oracle DUAL table.

Cheers
Greg
 
Greg,

thanks for the reply. My question is how do I convert
date into 'Mon DD, YYYY' format.
Oracle:
to_char(calendar.business_start ,'Mon DD,YYYY')

Db2 : ??

thanks,

ram
 
Ram,

I've got something along those lines here

select char(dayofweek(current timestamp)),' ',char(monthname(current timestamp)),' ',char(year(current timestamp)) from sysibm.sysdummy1

Cheers
Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top