Solved

Subtract 1 from a date field

  • 26 February 2021
  • 2 replies
  • 126 views

Badge +3

Hi everyone

 

I would like to subtract 1 day from a date field, and store the result in another date field. I want to use this in a calendar view. I tried to use a calculated value field in my list, but the calendar view does not seem to accept columns which are calculated values. 

So, my next bet is to do the calculation in the workflow. In my calendar view, I need the "startdate"  and the "enddate". But the end date is "Returndate" - 1. The result must be a date only value.

Can someone assist me with the syntax and the type of action to use inside the workflow?

icon

Best answer by bamaeric 4 March 2021, 17:46

View original

2 replies

Userlevel 5
Badge +13

You should be able to use the "Add Time to Date" action.  Configure that action with the Days setting to -1 and store the result in a workflow variable of type Date/Time.  Next use the "Update List Item" action and update the date field using the date workflow variable. 

Badge +3
Thanks, this works well. Sorry so late!!

Reply