subtract month from now

arkiboys 9,686 Reputation points
2022-04-13T10:11:02.627+00:00

In data factory dynamic content I am building a string as follows
but it appears there is no function for addMonth.
I would like to takeaway month from current date.
How can I do this please?
Thanks

...
'myTimestamp gt ', addMonth(utcNow(), -1),
' and myTimestamp lt ', addDays(utcNow(), -1),
...

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,196 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Nandan Hegde 31,511 Reputation points MVP
    2022-04-13T10:37:08.957+00:00

    Hey,
    please use the below expression:

    @formatdatetime(concat(utcnow('yyyy'),'-',string(add(int(utcnow('MM')),-1)),'-',utcnow('dd')))