on 10-25-2007 5:57 AM
Hi Guys,
I am doing scenario File to Idoc, i have to sort date in acending order, the date format will be in either 22.10.2007 or 22/10/2007 . can any one send UDF for this.
Regards,
venu gopal
Hey Venu,
No need to use any UDF for this, just use dateTrans function under DATE and first make it like 24102007 in your mapping and then use sort (use Number) function to sort it then again convert it into your desired need by using dateTrans function.
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 Venu
You can execute this without UDF. Use " Transform" function in the Date functions.
When you are using the UDF....you keep the strucure as "yyyMMddhhmmss" for that clickon Trnasform function and there you can see ShowAdvancedProperties...there u can find the format of the source which you are expecting and also change the strucutre of you target expected format.
You please try this and check the mapping it will get execute.
Use Standard Date Function DATATRANS. It have the property for format and input is the source date field. It will convert the date format to required specified format which you menstion in the DARTATRANS function
for UDF
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Veni
See the blow code for sorting the date. But if u give me exact dataType of sender and receicver i can send u exact UDF's
public void sortDate(){
List dateList = new ArrayList();
Date date = new Date("25/10/2007");
dateList.add(date);
date = new Date("3/9/2007");
dateList.add(date);
date = new Date("27/10/2007");
dateList.add(date);
Collections.sort(dateList);
for (Iterator iter = dateList.iterator(); iter.hasNext();) {
Date element = (Date) iter.next();
System.out.println(element);
}
}
<b>Award point if helpful</b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use the SORT function in the Mapping.....hope this helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
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.