workday substract value

Hi!

I'm new to this forum. I want to get start date by substracting duration in days from end date.

workday([end date],(-[duration]))

No matter if I put - in front of duration or not it always returns addition.

If multiply duration by -1 I get error.

workday([rok izvedbe],(-1*[trajanje dni]))

Any help would be appreciated

Solved Solved
0 6 165
1 ACCEPTED SOLUTION

I think it's erroring out for any record where there isn't a date value in that column. Try this:

IFS(
  ISNOTBLANK( [end date] ) ,
  WORKDAY( [end date] , -1 * [duration] )
)

View solution in original post

6 REPLIES 6

WORKDAY( [date] , -5 )     ...works fine for me.

If you get an error when trying to multiply by -1, I'd have to assume that your duration value isn't actually a Number.

 

Hi!
Thank you for your reply, but even if I try same as you wrote above I get an error when I test the formula.

The URL was: /template/showtable?appId=vodenjedela-497213338&tableName=vnosi&schemaName=vnosi_Schema&expressionColumnName=pri%C4%8Detek&rowChangeContext=true&locale=sl-SI&tzOffset=-60&location=0%2C%200&expression=workday(%5Brok%20izvedbe%5D%2C-5)&settings=%7B%22_RowNumber%22:%220%22%2C%22_EMAIL%22:%22%22%2C%22_NAME%22:%22%22%2C%22_LOCATION%22:%22%22%2C%22Options%20Heading%22:%22%22%2C%22Option%201%22:%22%22%2C%22Option%202%22:%22%22%2C%22Country%20Option%22:%22%22%2C%22Language%20Option%22:%22%22%2C%22Option%205%22:%22%22%2C%22Option%206%22:%22%22%2C%22Option%207%22:%22%22%2C%22Option%208%22:%22%22%2C%22Option%209%22:%22%22%2C%22_THISUSER%22:%22onlyvalue%22%7D

The added or subtracted value results in an un-representable DateTime. Parameter name: value

I'm using Date and Number column data type so that I think is not an issue...

Where are you using this formula?

In virtual column as App formula, data type is Date.

I think it's erroring out for any record where there isn't a date value in that column. Try this:

IFS(
  ISNOTBLANK( [end date] ) ,
  WORKDAY( [end date] , -1 * [duration] )
)

Hi! Seems like the error is now gone. Thank you so much for your help!

Top Labels in this Space