How to get the Last day of any month?

From a service I am getting date like this yyyyMM for example 199804. We need to append Last day of the month with this date.

Any idea how to do that?

I didn’t found any inbuilt function for the same?

I am looking for any inbuilt function for that as I dont want to add conditionally date in a DT or activity.

@Priyabrata_Biswas

I don’t think there is any OOTB Function to achieve that. You need to write your own function for this.

There are plenty of options available to write that java code.

I found the solution like this –

@addTodate(@addToDate((“date string”+“01”),0,1,0),-1,0,0)

How it is working:

Here “date string” is in format yyyyDD for example 199804

  1. First append “01” to make it 19980401

  2. Inner function to add one month to make it 19980501

  3. Outer function to minus 1 day to make it 19980430