I want to convert the date format dd-mm-yyyy to mm-dd-yy in transformer stage, but it only displaying in yyyy-mm-dd.
(I read the source date format as char from sequential file stage and now i am using StringToDate function to convert into mm-dd-yy. I am getting
yyy-mm-dd only it targer and it also some times viewing as ********** when i tried to view ny dataset management facility).
can any one help for this?
Date Conversions
Moderators: chulett, rschirm, roy
Re: Date Conversions
Hi,iamnagus wrote:I want to convert the date format dd-mm-yyyy to mm-dd-yy in transformer stage, but it only displaying in yyyy-mm-dd.
(I read the source date format as char from sequential file stage and now i am using StringToDate function to convert into mm-dd-yy. I am getting
yyy-mm-dd only it targer and it also some times viewing as ********** when i tried to view ny dataset management facility).
can any one help for this?
U can use this function in the transformer
Field(DSLink3.Date,'-',2) :'-' : Field(DSLink3.Date,'-',1) :'-':Right(DSLink3.Date,4)
. use this function stage variable and then use that in derivation part
Date: column name
source/target metadata: varchar
Regards
Naveen.K
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
What is the format of the data in the character string that you are reading? Use this as the format string in a StringToDate() function. Use that result in a DateToString() function, this time specifying the desired output format. The function calls may be nested.
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.