none
Sharepoint 2013 Workflow - Can not set date field with calculated date/time

    Question

  • Hi everbody,

    In a list I have this situation:

    1) a date time field called StatDate;

    2) a number field called Hours;

    3) a date time field called EndDate.

    In a workflow I want to set the value of EndDate field to StartDate + Hours.

    Example:

    StartDate: 20/03/2017 08:00

    Hours: 6

    EndDate: 20/03/2017 14:00

    In a workflow I've tried to do this:

    1) create a local variabile called TotHours  (type Number) to store the value of CurrentItem:Hours

    2) create a locale variable calledDateTimeEndDate to store the calulated value;

    3) Add 0 months, 0 days, TotHours hours, 0 minutes to CurrentItem:StartDate  output on DateTimeEndDate

    4) Set the EndDate field to variable:DateTimeEndDate

    But dont work...

    I've tried also to UPDATE the EndDate instead of Set but nothing changes....

    My workflow execute other operations but if I put these istructions at the top of the flow it stops working

    What can I do?

    Thanks to all

    Thanks

    Tuesday, March 21, 2017 10:07 AM

Answers

  • Hi marcomac- why don't you just use a calculated column for this? Sounds like you're going through a lot of work for something that can be simple.

    cameron rautmann

    • Marked as answer by marcomac Thursday, March 23, 2017 11:49 AM
    Tuesday, March 21, 2017 12:59 PM

All replies

  • Hi marcomac- why don't you just use a calculated column for this? Sounds like you're going through a lot of work for something that can be simple.

    cameron rautmann

    • Marked as answer by marcomac Thursday, March 23, 2017 11:49 AM
    Tuesday, March 21, 2017 12:59 PM
  • Yes I've done this way

    thanks

    Thursday, March 23, 2017 11:48 AM