Skip to main content
New Participant
Nov 24, 2023 6:40 AM UTC
Question

How to use process calendar in a!subtractDateTime() ?

I have a requirement, which is to query data within two working days.

I use process calendar and a!subtractDateTime() to achieve this functionality.

I first defined the holiday in the process calendar, and used a!subtractDateTime() to calculate the start time of the query.

Code:

a!subtractDateTime(
startDateTime: now(),
days: 2,
useProcessCalendar: true,
processCalendarName: "MasonTestCal",
) & " ---- " & now()

The out put is:

My account is set up as follows:

Questions:

1.Why are the calculated results not different by 48 hours?

2.What are the specific rules for a!subtractDateTime() when using process calendar?

3 replies

annap0005
Participating Frequently
Nov 24, 2023 9:02 AM UTC

your time zone is est, now()-2 is 22nd current time in est is not a working hr.
so that its considering previous day last working hr which is 21st 6pm GMT which is nothing but 21st 1pm EST

New Participant
Nov 24, 2023 4:44 PM UTC

thank you for your reply.
Do you have any suggestions for my requirement?

annap0005
Participating Frequently
Nov 27, 2023 6:23 AM UTC

You do not need to anything, just cross check the data. it should be correct.