on 09-29-2009 12:41 PM
Source sidefield:ZALDAT
Taget Structure mapping condition:
Format MMDDYY. If check is voided then it should be '000000'
Taget field:Issue date
I Need how to mapping source to target field based on conditioin explain me?give me saple mapping given condition?
Hi,
Try this udf
youir input for this udf is "date" (which is a string)
SimpleDateFormat sdf = new SimpleDateFormat("MMddyy");
Date testDate = null;
try
{
testDate = sdf.parse(date);
}
catch (ParseException e)
{
return '000000';
}
if (!sdf.format(testDate).equals(date))
{
return '000000';
}
return testDate.toString();
code taken and modified from http://www.dreamincode.net/forums/showtopic14886.htm
Regards
suraj
Edited by: S.R.Suraj on Sep 29, 2009 7:53 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 an UDF and check for the date format from the source, if it is not matching then do the mapping as per your need.
Regards,
Nithiyanandam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sreenu,
Did you try using the DateTrans function of the Date function?
In that, chose the date format as MMDDYY and map to the target.
Regards,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.