I am trying to convert TODAY() to the WEEKDAY() and then to the single letter for that day of the week. I need to match that to a data feed that provides the day of the week as a letter. Here is my formula:
SWITCH(WEEKDAY(SET_TIMEZONE(TODAY(),'America/Los_Angeles')),0,"U",1,"M",2,"T",3,"W",4,"R",5,"F",6,"S")
The problem is that it is returning the wrong WEEKDAY() numeral. If I do this:
SET_TIMEZONE(TODAY(),'America/Los_Angeles')
I get the correct day. And if I do this:
WEEKDAY(TODAY())
I get the correct weekday.
But as soon as I combine these ideas it’s returning the value for yesterday. So, assuming we are using today as 2/2/2022 I’d expect to get WEEKDAY() of 3 and my SWITCH() would change it to a W. But what I am getting returned is “2” which is turning into a T.
Thoughts?