Architect expression logic failing for date comparison - DateTimeDiff vs GetDayOfWeek

Hey everyone,

I’m trying to build a simple routing rule in Architect that checks if the current day is a weekday. Seems straightforward, right? But I’m getting unexpected results.

I tried using DateTimeDiff to compare the current time against a fixed date to calculate the day of the week, but the syntax for the format string is giving me grief. It keeps returning null or throwing a validation error in the expression builder.

Here is what I’ve got so far:

DateTimeDiff(GetCurrentDateTime(), "2024-01-01T00:00:00Z", "d")

This returns the number of days elapsed, which isn’t helpful for finding the specific day index. I know GetDayOfWeek() exists, but when I try to use it in an IF condition like this:

IF(GetDayOfWeek(GetCurrentDateTime()) == 1, "Monday", "Other")

The expression editor flags it as invalid. Is the return type of GetDayOfWeek not an integer? Or is there a specific constant I need to compare against instead of 1?

I’ve checked the docs and they are pretty light on the actual return types for these date functions. Anyone got a working snippet for a “Is Weekday” check that doesn’t require a complex array lookup?