Does workday() function with weekend holiday recognize it during the week?

Hello. In my send email activity, part of my message logic uses the workday function in an expression.

=if(
  isnull(pv!request.value),
  workday(today(), 5),
  workday(today(), 6)
)

While testing last night (July 1st), we expected the date returned to be 5 working days ahead (July 8th) since the value is null (verified). The resulting email was 6 working days ahead (July 9th).

My only assumption is that Independence Day is observed on Monday, July 5th so the workday function excludes Monday in its calculation. Is this true?

The workday function allows for an array of holidays to exclude, but the sample seems to want specific dates, not just a identifier of the holiday name.

Are we expected to write every year of dates? It can be done, but was just interested in this approach.

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Appian Employee
    in reply to seze

    I don't think this is an issue with the workday function - I just tested it right now and it returned the correct number of days (without including July 4th). My guess is that this is a timezone issue and not an issue with the workday function - what time last night did you try this? Usually the today() function returns the result in GMT, so if you tried this late last night it might have interpreted "today()" as July 2nd.

Children