Select to view content in your preferred language

Time Rounding and Calculations

265
3
Jump to solution
3 weeks ago
ModernElectric
Frequent Contributor

@JamesTedrick @IsmaelChivite @Jim-Moore 

@abureaux 

I am working on a complex form that I need assistance with. Trying to figure out if this is possible in Survey123 Connect or if I need to research how to do it in Power Automate. 

Job Start Time: 8/26/2024 @ 12:25 PM 

Leave Job Site: 8/26/2024 @ 4:43 PM

Here is what needs to be done. I've been given a specific rounding table that I need to, somehow, configure into the code:

ModernElectric_0-1724707652017.png

Job Start Time turns into 13.50 (12:25 pm --> 12.40 --> 12.50)

Leave Job Site turns into 16.75 (4:43 pm --> 16.72 --> 16.75)

From here, need to be able to calculate the difference (16.75 - 12.50 = 4.25 hours worked). ALL ending calculated time on site needs to be 0.00, 0.25, 0.50 or 0.75.

Please help.

Appreciate it in advance.

0 Kudos
1 Solution

Accepted Solutions
ModernElectric
Frequent Contributor

Yes, this is what I have been searching for and couldn't find pieces of the puzzle to piece together. THANK YOU!!

ModernElectric_0-1724782618483.png

I will use this as a building block and build from here. 

Appreciate it. 

View solution in original post

0 Kudos
3 Replies
abureaux
MVP Frequent Contributor

I believe this will work. Only did a couple of tests though.

abureaux_0-1724781154585.png

 

abureaux
MVP Frequent Contributor

BTW, Looks like there is something wrong with your 6 and 7:

abureaux_0-1724781354286.png

Should be this, I believe:

abureaux_1-1724781382121.png

Not sure if you already noticed, but thought I'd mention.

ModernElectric
Frequent Contributor

Yes, this is what I have been searching for and couldn't find pieces of the puzzle to piece together. THANK YOU!!

ModernElectric_0-1724782618483.png

I will use this as a building block and build from here. 

Appreciate it. 

0 Kudos