Our Daylight Savings time springs forward the second sunday in March at 2AM MST and falls back the first Sunday of November at 2AM MST so I have tried modifying this expression in an UPDATE DATA ACTION provided by Genesys. I am pretty new to expressions and can't quite understand it all. Any help would be greatly appreciated.
Here is the modified Expression but it errors at (Month(Flow.UtcDateTime) > 3)
AddMinutes(Flow.StartDateTimeUtc,
(
If(Flow.StartDateTimeUtc >= GetDayOfWeekOccurrence(1,-1,Year(Flow.StartDateTimeUtc),3,1,0,0)
and Flow.StartDateTimeUtc <= GetDayOfWeekOccurrence(1,-1,Year(Flow.StartDateTimeUtc),10,1,0,0),
-360,
-420)
)
)
(
(Month(Flow.UtcDateTime) > 3)
or
(Month(Flow.UtcDateTime) == 3 and Month(AddDays(Flow.UtcDateTime, -7)) == 3 and Month(AddDays(Flow.UtcDateTime, -14)) == 3)
or
(
(Month(Flow.UtcDateTime) == 3 and Month(AddDays(Flow.UtcDateTime, -7)) == 3 and Month(AddDays(Flow.UtcDateTime, -14)) == 2)
and
(DayOfWeek(Flow.UtcDateTime) > 1 or (Hour(Flow.UtcDateTime) >= 2))
)
)
and
(
(Month(Flow.UtcDateTime) < 11)
or
(
(Month(Flow.UtcDateTime) == 11 and Month(AddDays(Flow.UtcDateTime, -7)) == 10)
and
(
(DayOfWeek(Flow.UtcDateTime) == 1 and Hour(Flow.UtcDateTime) < 2)
or
DayOfWeek(Flow.UtcDateTime)!=1
)
)
)