I’m trying to add the ability to change time zones, with five select zones. My conditional doesn’t work, and I can’t figure out why.
Here’s what I’m trying to do, using an expression to cycle through the five selected zones.
I may add summer time zones for those cities above that use them, but that’s another hurdle that I’ll handle once I have the easy bit working.
So I use Var#2inc to cycle through and I want…
Var 2 = 0, UTC-5 NEW YORK
Var 2 = 1, UTC+2 PARIS
Var 2 = 2, UTC+3 MOSCOW
Var 2 = 3, UTC+9 TOKYO
Var 2 = 4, UTC LONDON
Splitting my equation out, I get…
$(#VAR_2#%5)=0?$$(#DUHZ#-5)>=24?((#DUHZ#-5)-24) : $
$(#VAR_2#%5)=1?$$(#DUHZ#+2)>=24?((#DUHZ#+2)-24) : $
$(#VAR_2#%5)=2?$$(#DUHZ#+3)>=24?((#DUHZ#+3)-24) : $
$(#VAR_2#%5)=3?$$(#DUHZ#+9)>=24?((#DUHZ#+9)-24) : $
$(#VAR_2#%5)=4?$$(#DUHZ#)>=24?((#DUHZ#)-24) : $
:#DUmZ#
minus the spaces of course…
…and putting it all together -
$(#VAR_2#%5)=0?$$(#DUHZ#-5)>=24?((#DUHZ#-5)-24):$$(#VAR_2#%5)=1?$$(#DUHZ#+2)>=24?((#DUHZ#+2)-24):$$(#VAR_2#%5)=2?$$(#DUHZ#+3)>=24?((#DUHZ#+3)-24):$$(#VAR_2#%5)=3?$$(#DUHZ#+9)>=24?((#DUHZ#+9)-24):$$(#VAR_2#%5)=4?$$(#DUHZ#)>=24?((#DUHZ#)-24):$:#DUmZ#
I don’t need the last 24hr excess check since the last one is basic UTC, but it shouldn’t make any difference if it is there. I can clean up that bit if the rest works.
All I’m seeing here is dollar signs. Can anyone see why this isn’t working for me? IT’s probably a rookie mistake - I’m not very experienced using expressions, but I can’t see it.