In an ADF Web Activity Body, how can you set today's date - Please help

Mike Kiser 1,531 Reputation points
2021-03-23T01:15:33.56+00:00

Hello again! @Nasreen Akter @MartinJaffer-MSFT

Here is just one of the Web Activities Body:
{
"EmployeeNumber": "@{item().employeeId}",
"EffectiveStart": "2018-10-01T00:00:00",
"EmploymentStatus": {
"IsBenefitArrearsEnabled": false,
"XRefCode": "@{item().status}",
"ShortName": "",
"LongName": ""
},
}

I need to send in today's date (the date of the REST call) for EffectiveStart. Is there any variable I can use to do this; is there something I can put in the above body for EffectiveStart to be todays date/time in the same format?

Thanks again!
Mike Kiser

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

1 additional answer

Sort by: Most helpful
  1. Nandan Hegde 29,886 Reputation points MVP
    2021-03-23T03:11:07.897+00:00

    Hey ,
    You can use @formatDateTime(utcnow(), 'yyyy-MM-ddTHH:mm:ss') function to get the date. This would provide the time as per UTC.
    There are other functions like @convertFromUtc() to get the date in needed timezone.

    1 person found this answer helpful.
    0 comments No comments