on 02-04-2009 10:31 AM
Hi ,
I need to change the input date format when mapped to target.
My input format is: 10-DEC-2006
The target should be in the format :YYYYMMDD (20061210)
Please suggest whether it is possible using DATE TRANSFORM Function or i need to write an UDF.Request to let me know the UDF code that i can use.
Thanks & Regards,
Yeswanth Raj
Hi,
Use Std. fun "DateTrans" Double click and put "dd-MMM-yyyy" in the Format of Source Date and put "yyyyMMdd" Target format.
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for ur help the date transformation function has worked
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use this mapping:
Input Date --> toUpperCase --> UDF --> Target
Execution type of the UDF is value, and the name of the argument is a
The content of the UDF is this:
String b=a.substring(3,6);
if (b.equals("JAN")) b= "01";
else if (b.equals("FEB")) b= "02";
else if (b.equals("MAR")) b= "03";
else if (b.equals("APR")) b= "04";
else if (b.equals("MAY")) b= "05";
else if (b.equals("JUN")) b= "06";
else if (b.equals("JUL")) b= "07";
else if (b.equals("AUG")) b= "08";
else if (b.equals("SEP")) b= "09";
else if (b.equals("OCT")) b= "10";
else if (b.equals("NOV")) b= "11";
else b="12";
return (a.substring(7,11)ba.substring(0,2));
hope this helps,
Edited by: Mark Dihiansan on Feb 5, 2009 6:16 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use date trans function
Input->TransformDate>Output
Right click on transformDate and change properties
Sourceformat- dd-MMM-yyyy
Targetformat - yyyyMMdd
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Yeshwanth,
Get the substring (DEC) from the input date format.
Then use fixValues standard function.In that you define all the 12 months names and their corresponding integer values. After retrieving the value of the month, again concat this with the date and the year and then do date transformation.
I know this is a bit long. But, if you dont want to go for any udf's, i think this would be one of the solutions.
Regards,
Swetha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you tried it. Let us know if face any problems.
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
try this.......use Date transformation.......input format dd-MMM-yyyy and target format yyyyMMdd.
Regards,
Rajeev Gupta
Edited by: RAJEEV GUPTA on Feb 4, 2009 11:55 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.