In a server job, have two columns:
TranDate Decimal(8) values= 20080812
TranTime Decimal(8) values= 00000000
and want to load into db2 timestamp column: TrandtTime Timestamp
Thanks.
Making Timestamp column for DB2
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Substring and concatenation will suffice.
I have assumed here that the final two digits of TranTime are centiseconds.
Code: Select all
InLink.TranDate[1,4]:"-":InLink.TranDate[5,2]:"-":InLink.TranDate[7,2]:" ":InLink.TranTime[1,2]:":"InLink.TranTime[3,2]":":":InLink.TranTime[5,2]:".":InLink.TranTime[7,2]
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
I used following and it worked:
Code: Select all
Oconv(Iconv(a.TRANDATE_C702,"D YMD"),"D-YMD[4,2,2]"): " " : Oconv(Iconv(svTime, "MTS"),"MTS")