Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get the last day of a month in dynamic content in ADF2?

I want to get the last day of a month based on the utcnow() timestamp.

Instead of "dd" in the expression bellow there should be automatically the last day of the month (28, 30 or 31):

@{formatDateTime(adddays(utcnow(),-2), 'yyyy-MM-ddT23:59:59.999')}

Thinking that it´s actually august I expect the following result out of the expression: "2019-08-31T23:59:59.999"

like image 608
Michael Avatar asked Aug 23 '19 07:08

Michael


1 Answers

    @adddays(startOfMonth(addToTime(utcnow(), 1, 'Month')), - 1, 'yyyy-MM-dd')

More here:

Azure Data Factory - Expressions for Strings, Dates and More

like image 108
SomeGuy Avatar answered Oct 31 '22 17:10

SomeGuy