Hi,
I want to set a datetime time value to the end of the day.
On a designs_workflowEditItemAction
workflow node.
I’ve created variable to get the attribute I want to edit. In this case target time.
{"name": "targetdatetime",
"value": {"discriminator": "WorkflowSyntaxNodeInputWebModel",
"inputParent": 0,
"itemValue": {"discriminator": "WorkflowSyntaxArgumentItemValueAttributeWebModel",
"attributeCode": "attributes_tasksTargetTime"}}}
I’ve also created a parameter to update the attribute using the Ceiling function.
{"discriminator": "WorkflowComputedItemAttributeWebModel",
"attributeCode": "attributes_tasksTargetTime",
"value": {"discriminator": "WorkflowSyntaxNodeScriptWebModel",
"script": "TimeSpan ts1 = new TimeSpan(24,0,0); return DateTimeMath.Ceiling(targetdatetime.Value, ts1);",
}}
If there is any easier way of achieving this, I’d like to know.