question

ewinkiser avatar image
0 Votes"
ewinkiser asked MartinJaffer-MSFT answered

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

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MartinJaffer-MSFT avatar image
0 Votes"
MartinJaffer-MSFT answered

There is also

@pipeline().TriggerTime

For the time the trigger is fired (not the scheduled time)

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

NandanHegde-7720 avatar image
1 Vote"
NandanHegde-7720 answered NandanHegde-7720 edited

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.