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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date function in DB2

Status
Not open for further replies.
Apr 4, 2005
13
US
In framework manager there is a calculation in the DB2 section called "Date". Supposedly this field will change a numeric date "01012005" to an actual date "01/01/2005". But, we tried it and it does not work. Can you see if you can find anything that will allow us to create a calculated field in framework manager that will convert the dates for us.
 
If the positions of the characters in the field are fixed, you can do this:


select substr(dait,1,2) || '/' || substr(dait,3,2) || '/' || substr(dait,5,4)
From TABLE_1
 
or perharps something like ...
Select
substr(Digits(NumDate), 1, 2) || '/' ||
substr(Digits(NumDate), 3, 2) || '/' ||
substr(Digits(NumDate), 5, 2) as ActDate
From ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top