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
EDIT: I'm reading the description wrong. The holiday array just adds to the list of days to exclude (July 4th already being excluded) so using it won't help my case anyway
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.
This was 9:16 PM eastern
Was able to find an older post about casting now into a date to get the current day. Will try to implement that.
todate(now())