Skip to main content
November 24, 2023
Question

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

  • November 24, 2023
  • 3 replies
  • 0 views

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
November 24, 2023

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

November 24, 2023

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

annap0005
November 27, 2023

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