cancel
Showing results for 
Search instead for 
Did you mean: 

UDF to find the day of the year

sherin_jose4
Participant
0 Kudos

Hi all,

Could someone provide me the UDF to find the day of the year.

For Example,

My input date will be 07/11/2013 (dd/MM/yyyy)

My output date should be 13311 (yyddd)

Here ddd will be the day of the year starting from Jan 1.

In the above example, Nov 11, 2013 is 311th day of the year.

Thanks,

Sherin Jose

Accepted Solutions (1)

Accepted Solutions (1)

praveen_sutra
Active Contributor
0 Kudos

hi Sherin,

Date now = new Date();

DateFormat d = new SimpleDateFormat("yyD");

result.addValue(d.format(now));

this should give the required ouput.

thank and regards,

Praveen T

sherin_jose4
Participant
0 Kudos

Hi,

Thanks for your kind help.

I was able to achieve the same in Date function in Message Mapping.

Just gave the Date format as yyD

Answers (0)