I am having a flat file with date format yyyymmdd. In my target table i want to change this date format into 'yyyy-mm-dd' using transformer. Please tell me , what function should i use???
Any Help?
Date Conversion
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
In server jobs there are no data types, so you can treat both as strings and simply use substrings and concatenation.
Or you could use Fmt() function, or a combination of Oconv() and Iconv().
Code: Select all
InLink.TheString[1,4] : "-" : InLink.TheString[5,2] : "-" : InLink.TheString[7,2]
Code: Select all
Fmt(InLink.TheString,"L####-##-##")
Code: Select all
Oconv(Iconv(InLink.TheString,"DYMD"),"D-YMD[4,2,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.
-
- Participant
- Posts: 247
- Joined: Thu Apr 27, 2006 6:38 am
- Location: Hyderabad
-
- Participant
- Posts: 247
- Joined: Thu Apr 27, 2006 6:38 am
- Location: Hyderabad