Thursday, May 16, 2019

SharePoint Designer 2010 - Set Variable [Today]-x Days



To set a DateTime field to [Today] + 5 days using a SharePoint Designer 2010 Workflow, this is what I did:


1) Create a Local Variable (ETA Date) of type Number
2) Use a Do Calculation task in the workflow and set:

value: Workflow Context:Date and Time Last Run (As Double)
operation: plus
value: 432000 (number of seconds in 5 days or 60*60*24*5)
Output to: Variable: ETA Date


3) Finally, set the value of the respective field of the current item to the ETA Date variable
In your case, use the subtract operation and the second value is 2419200 (60*60*24*28).


Note: Compare the Date in Workflow, Current Item:ReminderDate equals (ignoring time) Today


Reference Link

No comments:

Post a Comment

Your feedback is always appreciated. I will try to reply to your queries as soon as time allows.Please don't spam,spam comments will be deleted upon reviews.