1

After looking into the ADFv2 expression language documentation,I didn't find any function that can return number of days in a given input month. Something like this is quite essential so it's quite surprising that there is no support for this. Is there any way to make this work? Even there is no function to get last day in a month , at least that way one could take the diff and calculate days.

Dhiraj
  • 3,396
  • 4
  • 41
  • 80

1 Answers1

2

Agree with that "Why there is no endOfMonth,only startOfMonth,though it is essential i think???" You could refer to the solution provided in this thread which has same requirement as you:How can I get the last day of a month in dynamic content in ADF2?

The solution is summed up in two points

1.Store the dates and their respective end of month in a table or file,namely a reference data source,then use LookUp Activity.

2.Or use built-in functions in destination,such as in sql server.

In addition,my idea is using If-Condition Activity to construct such feature.Judge whether it is in 1,3,5,7,8,10,12 month or not.(Plus whether it is leap year for Feb.)

Jay Gong
  • 23,163
  • 2
  • 27
  • 32
  • 1
    Thanks for the link @JayGong. I had fun working on that one - you should see the edits! Feel free to upvote my answer! Votes is the currency of stackoverflow : ) – wBob Dec 06 '19 at 12:31