Skip to main content
Question

workdayadd gives a sunday as result

  • October 2, 2019
  • 0 replies
  • 29 views

Hi
My WorkdayAdd formula is returning a Sunday?

Fields:
Start Date = date field
Duration Days = numeric
End Date = date field

First End Date formula - this gave error "expecting workdate but found date"
WorkdayAdd([Start Date],[Duration Days])

So I cast the StartDate to a workday - this gave error "expecting date but found workdate":
WorkdayAdd(ToWorkDate([Start Date]),[Duration Days])

So I cast the result to a date
ToDate(WorkdayAdd(ToWorkDate([Start Date]),[Duration Days]))

Now when I calculate dates the answer is NOT a work day.
Start Date = Oct 1st 2019 (Tuesday)
Duration Days = 5
End Date = Oct 6th 2019 (Sunday)

I cannot find a field type that is workdate so that I can make a field always a workdate and not need to cast.
Is it possible?
How can I force a date field to be a workdate - both for formula and for manual entry fields?

If I always need to cast, why is the formula returning a Sunday?

Just in case it is relevant, all dates are in DD-MM-YYYY format.

What am I missing?
Thanks

------------------------------
Vlad Gorre
------------------------------
This topic has been closed for replies.

  • Registered
  • October 2, 2019
WorkdayAdd - For some reason this is the whole week.

You want WeekdayAdd.