Hi @ren0927
Take a look at the Diversion DataCard - Update formula. It should look something like this:
If(Not IsBlank(DateValue1.SelectedDate), DateTime(Year(DateValue1.SelectedDate), Month(DateValue1.SelectedDate), Day(DateValue1.SelectedDate), Value(HourValue1.Selected.Value), Value(MinuteValue1.Selected.Value), 0))
From that formula we can take this code for the selected DateTime:
DateTime(Year(DateValue1.SelectedDate), Month(DateValue1.SelectedDate), Day(DateValue1.SelectedDate), Value(HourValue1.Selected.Value), Value(MinuteValue1.Selected.Value), 0)
If you add a Text Label, you can set the Text property to:
If(
Not IsBlank(DateValue1.SelectedDate),
Text(
DateAdd(
DateTime(
Year(DateValue1.SelectedDate),
Month(DateValue1.SelectedDate),
Day(DateValue1.SelectedDate),
Value(HourValue1.Selected.Value),
Value(MinuteValue1.Selected.Value),
0
),
45,
TimeUnit.Minutes
),
"mm/dd/yyyy hh:mm"
)
)
The DateAdd function is the one you are looking for. You can find more information here:
https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-dateadd-datediff
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.
-Mark