cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lardo5150
Microsoft
Microsoft

Convert Choice Column Whole Number into UTC Hour

I have a choice column in my SPO List

lardo5150_0-1646171011156.png

 

The choices in this column are 0-23.  All whole numbers.

They represent Hours in the 24hr format, but in CENTRAL time zone.

I have a matching column called QueueTimeUTC, with the exact same choice setup.

using the example above, I have an engineer with the queue times in hours of 7,8,9,10,11

I need to convert these "hours" to UTC time, and populate the choice column of QueueTimeUTC with those values.

What I mean is, for example, if the CST Choice is 7, we need to convert that to the whole number that would represent the UTC number, and add that to the Choice column of queuetimeutc

Any idea how to accomplish this?

2 REPLIES 2
Expiscornovus
Dual Super User
Dual Super User

Hi @lardo5150,

 

You could use the UtcNow function in an expression and change the format to always use 00:00:00. This way you can use the selected number value and at it as hours via the addhours function to that UTC Time.

 

Below is an example of that approach.

In this approach I am retrieving the first selected value (7) via a Get Item action using an index [0]. I am outputting it in a single line of text column btw.

 

addHours(utcNow('yyyy-MM-ddT00:00:00.fffffffK'), int(outputs('Get_item')?['body/AssignmentHours'][0]['value']))

 

addhours_int.png

 

output_queuetime.png

 

That is close.  I have been working on this a bit last night as well.

What the end result should be is a CHOICE in the queutimeutc column.

So if we have 7,8,9 in the assignment hours column as choices,

My end result should be (I am just guessing here at what UTC time would be in 7,8,9) 2,3,4 as choices in the queuetimeUTC column.

Does that make sense?

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (1,800)