문제

I'm about to create a Workflow in SharePoint 2010 Designer. I created a Variable calling "DateToday". I set the variable in the Workflow and click on the button with the "..." on it and choose "Current date".

I now have another variable called "TodayMinus28". I want the current date, minus 28 days. How can I do this? I tried

[Today]-28

and

DateToday-28

but nothing seem to work. Both variables are initialized as Date/Time.

Can anybody help me?

Here's a screen of my workflow. "Heute" == "Today", "Wert" == "Value".

http://imageshack.us/a/img689/4048/workflow.jpg

Thanks in advance.

도움이 되었습니까?

해결책

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).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top