Power Apps: Convert Time

Описание к видео Power Apps: Convert Time

In this video, we will learn how to convert a decimal number of minutes and convert it into a hh:mm:ss time string. We'll utilize the With Function within the Power FX language to achieve this. We'll take it one step at a time and use multiple controls within Power Apps to make things easy to understand and follow. We will do a Power Apps Convert on the time values.

Accompanying Blog Post: https://powerappstutorial.com/power-a...

🍭Join our free community and get my Power Apps Crash Course for free: https://www.skool.com/power-apps-comm... ⬅️

Download the project file here: https://github.com/PowerAppsDarren/Ti...

Darren Neese, Microsoft MVP, PowerApps Tutorial

TIMESTAMPS =======================================
0:00 - Intro
0:28 - Start adding controls
3:00 - Adding 3 labels to hold the 3 values
5:30 - Magic behind the formula is algebra
13:20 - Find out if there is a decimal in the seconds
18:30 - Using Left to get at the first 2 decimals
22:30 - Finally getting to the string format
26:00 - It works. Now let's work on the end formula
28:00 - Using the With Function
32:50 - Nesting a 2nd With Function

Here's the code ======================================
With(
{
DecimalValue: YOUR_TIME_VARIABLE
},
Text(
Trunc(DecimalValue / 60),
"00"
) & ":" & Text(
Trunc(Mod(DecimalValue, 60)),
"00"
) & ":" & Text(
Trunc(Value(
With({
SecondsDecimal: If(IsBlank(Find(".", Text(DecimalValue))),
0,
Left(Last(Split(Text(DecimalValue), ".")).Result, 2)
)
},
If(Len(SecondsDecimal) = 1,
SecondsDecimal & "0",
SecondsDecimal
)
)
) * 60 / 100),
"00"
)
)


#DarrenNeese
#PowerAppsTutorial
#LowCode

Комментарии

Информация по комментариям в разработке