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

Re: Java udf for deliveryd date

$
0
0

Hi,

 

If u wish to have a UDF for this then add import instructions as shown below & have a UDF with all values of queue:

 

Date1.jpg

 

See it is working:

Date2.jpg

 

Here is the code:

 

 

 

try

{

SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");

Date Stt = dateFormat.parse("00/00/0000");

 

 

for(int i =0;i<var1.length;i++)

{

   

Date TaskDate = dateFormat.parse(var1[i]);

if(TaskDate.after(Stt))

    Stt = TaskDate;

   

}

 

DateFormat df3 = new SimpleDateFormat("dd/MM/yyyy");

result.addValue(df3.format(Stt));

}

catch(ParseException p)

{

result.addValue(p.toString()); 

}

 

 

 

Hope this helps.


Viewing all articles
Browse latest Browse all 10473

Trending Articles



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