No clue how to do this.
I have a choice column in SPO that we use to assign hours to an engineer.
For example, Engineer A may be assigned the hours 7, 8, 9, 10
Engineer B may be assigned 11,12,13,14
Each hour is in 24hr.
I need to grab this information based on the engineer using the app. That part I can handle.
What I dont know how to do is when I get that information in a variable, how to I go through Each piece and convert it.
For example, I grab the working hours for Engineer B, which is 11,12,13,14
Now, these numbers are based in CST time.
The first thing I need to do is convert those to the current TimeZone.
For timezone I am currently doing this to get the different time zone.
et(var_TimeZone,"UTC"
& If(TimeZoneOffset() > 0, "-", "+")
& RoundDown(Abs(TimeZoneOffset()) / 60, 0)
& ":"
& If(Mod(Abs(TimeZoneOffset()), 60) < 10, "0", "")
& Mod(Abs(TimeZoneOffset()), 60));
That variable will show me the current timezone. For example, Eastern, the variable will return UTC-6:00
So for an Eastern Timezone, I will need to ADD 1 to each one.
11,12,13,14 will now become 12,13,14,15
If the timezone is central, then they stay the same
If Mountain, we subtract 1
If pacific, we subtract 2
Using our example, now that we have 12,13,14,15, I need to conver it to 12hr with AM PM, and then format it into a label.
So 12,13,14,15, will become in the final result in a label:
12 PM
1 PM
2 PM
3 PM
The am and pm is added, and the numbers are listed top to bottom just like above.
Anyway to do this?

Report
All responses (
Answers (