locked
Data Factory time functions returning unexpected results RRS feed

  • Question

  • I have the following WindowStart value according to the Monitor and Manage app: 02/26/2017 12:00 AM UTC

    What I wish to do is return the value of the last day of the following month ( so 03/31/2017 for this example)

    I have created the following function:

    "$$Text.Format('{0:yyyyMMdd}',Date.EndOfMonth(Date.AddMonths(WindowStart,1)))"

    This should add a month to WindowStart, returning 03/26/2017 12:00 AM UTC, and then EndOfMonth of this to 03/31/2017, and format this to 20170331. 

    However, the result is: 20170425

    Don't quite see how it is possible to get that result from the function... 

    Monday, February 27, 2017 8:46 AM