web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / difference between time
Power Apps
Answered

difference between time

(0) ShareShare
ReportReport
Posted on by

Hi , I am new to PowerApps. Recently I have developed an App where in I need to calculate the diff in the time in Minutes. I have a Form  where in the user would select the Activity start time via a Date Picker  with time input . and in a second filed in the Same Form selects the Date and time. I need to find the time difference between the two in Minutes. 

I find it difficult as both the fields are apart of a Form connected to a SharePoint List.

Would appreciate ,if anybody have overcome this issue.. 

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    DateDiffStartDateTimeEndDateTime [, Units ] ), units would be Minutes

    ref: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-dateadd-datediff 

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@Paresh_K,

    Based on the issue you mentioned, you want to display the date-time difference in minutes in your form.

    I think the best way is to add labels to respectively display Activity start time, Activity end time, and time difference in minutes.

    I have a test on my side, please take a try as below:

    1. Create an app directly from your SP list.
    2. Insert 3 labels below the two date datacards
    3. Set the Text property of the Labels as below:

    Label1 for Activity start date-time:

     

    Text(
     DateValue1.SelectedDate + Time(Value(HourValue1.Selected.Value), Value(MinuteValue1.Selected.Value), 0),
     DateTimeFormat.ShortDateTime)

     

    Label1_1 for Activity end time date-time:

     

    Text(
     DateValue2.SelectedDate + Time(Value(HourValue2.Selected.Value), Value(MinuteValue2.Selected.Value), 0),
     DateTimeFormat.ShortDateTime)

     

    Label1_2 for the time difference in minutes:

     

    DateDiff(
     DateTimeValue(Label1.Text),
     DateTimeValue(Label1_1.Text),
     Minutes)

     

    Note: Value1/2 represents Activity start/end time value.

    052002.png

     

    Best Regards,

    Qi Qiao

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 846

#2
Valantis Profile Picture

Valantis 532

#3
Haque Profile Picture

Haque 410

Last 30 days Overall leaderboard