Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9110

Re: Need help in mapping logic ...!!!

$
0
0

you can use simple UDF to create this...

 

public String getDate(Date idocDt, int dateCounter) {

String formatted = null;

try{

Calendar c =Calendar.getInstance();
c
.setTime(idocDt);
c
.add(Calendar.DATE,dateCounter);

SimpleDateFormat format1 =newSimpleDateFormat("yyyy-MM-dd");
formatted = format1.format(cal.getTime());


} catch(Exception e){

     e.printStackTrace();

     formatted = "";

}

return formatted;

 

}

pass the idoc date in the first argument for the above method.

 

Pass values  1 for BeginDate in the dateCounter and  7 for EndDate.

 

add import statement as follows..

 

 

import java.util.*;

import.java.text.*;

 

Message was edited by: Baskar Gopalakrishnan


Viewing all articles
Browse latest Browse all 9110

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>