PATCH to calculate a date plus 30 days
I am trying to use a Web Service to update a ticket once it is approved at a point in a workflow. I am able to update the status and create an "Effective Date" utilizing the "Modified Date" using the following code in the body:
[
{"op": "replace", "path": "/Attributes/3756", "value" : {{PostDate}}},
{"op": "replace", "path": "/StatusID", "value": "306"},
]
But I also want to calculate an end date - using the Modified Date plus 30 days. How is this written? It did not like the following. Maybe it does not like the format?
[
{"op": "replace", "path": "/Attributes/4276", "value" : {{PostDate}} + 30},
]
Thanks,
Answer (1)
One way a Professional Services associate has advised doing this would be like so:
[ {"op": "add", "path": "/StartDate", "value": "{{start}}-72"}, ]
I am thinking that it does not like the format of the date in this, but I am not sure how to get it into the right format. Also, I am using a PATCH - "replace" as I need to update the date if there is one already in there. Not sure if that makes a difference. - Kevin Hull Fri 4/21/23 9:11 AM