on 11-10-2009 4:41 PM
Hi,
I am mapping source date( yyyyMMdd) - date transformation(MMddyy) - mapping to target.
In my input data, i got the input as 00000000 and my output from date transformation is showing as 113002. Can anyone please explain why its showing like that?
Thanks & Regards,
Pragathi.
Hi,
In my input data, i got the input as 00000000 and my output from date transformation is showing as 113002. Can anyone please explain why its showing like that?
All 0's is not a valid date, that's why the date transformation throws a weird output. Make sure you get a valid date for this transformation.
If there is a possiblity that you might get all 0's in your date field, then better to filter those and make sure that they escape the transformation step.
Hope this helps.
Regards,
Neetesh
Edited by: Neetesh Raj on Nov 12, 2009 9:26 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Write a small UDF before sending the input to datetrans function.
String yr = a.substring(0,4);
String mm=a.substring(4,6);
String dd=a.substring(6,8);
if(yr.equals("0000")||mm.equals("00")||dd.equals("00"))
{
return "false";
}
else
return "true";
UDF output should be given to ifWithoutElse. Input to 'Then' need to be your source date.
Make sure that your output node's occurence is 0..1 or 0..unbounded if using 'ifWithoutElse' function. Otherwise use 'if'
function and pass a blank value in 'else' part.
Thanks,
Vishal
Edited by: Vishal.P.Kulkarni on Nov 11, 2009 6:11 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 |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.