When you’re building an app with Power Apps, one of the things you might need is to figure out how many days lie between two dates. Maybe you want to track how long a project will take, calculate the number of leave days someone is requesting, or manage the timeline for an event.
In this Power Apps tutorial, we will discuss how to Calculate Days Between Dates in Power Apps, calculate days between Start Date and End Date in Power Apps, and calculate Days between two dates using the Power Apps Text input control.
Also, I will tell you how to calculate days between dates, including Hours, Minutes, and seconds, in Power Apps with various examples.
Calculate Days Between Dates in Power Apps
Power Apps Calculate Days Between Dates means finding the number of days between two dates you select in the app. For example, if you choose a start date and an end date, Power Apps can help you quickly determine the total number of days between them. This is useful for things like tracking leave days, project durations, or event lengths.
So let’s get started!
How to Calculate Days Between Two Dates Using Power Apps Text input
In the image below, there are two Modern Text input controls where users can manually enter a Start Date and an End Date.
The right side label displays the total number of days between the Start and End dates.

To achieve it, apply the code below to the Label’s Text property:
"Total no. of Days: " & DateDiff(
txtStartDate.Value,
txtEndDate.Value,
TimeUnit.Days
)
OR
"Total no. of Days: " & DateDiff(
DateTimeValue(txtStartDate.Value),
DateTimeValue(txtEndDate.Value),
TimeUnit.Days
)
Where,
- txtStartDate, txtEndDate = Start Date & End Date Text inputs

Save and preview the app. Enter a Start Date and End Date (with mm/dd/yyyy) format. Then the total number of days will be visible in the label.
Calculate Days Between Start Date and End Date in Power Apps
Let’s say you’re building a leave request app for your company. Employees select their start date and end date for their leave. You want to automatically calculate the number of days of leave they are requesting.
In that case, the employee picks the start and end dates using Modern Date Picker controls. Power Apps then calculates the number of days between those dates and shows the total leave days on the label, as shown below.

To work around this, set the Label’s Text property to the code below:
"Total Number Of Days: " & DateDiff(
dtStartDate.SelectedDate,
dtEndDate.SelectedDate,
TimeUnit.Days
) + 1
Where,
- dtStartDate, dtEndDate = Modern Date Pickers for Start Date and End Date

This way, we can calculate the days between the Start Date and End Date in Power Apps.
Calculate Days Between Dates (With Hours, Minutes, and Seconds) in Power Apps
Suppose you want to display the total number of Hours, Minutes, and Seconds between the two Date picker controls (Start Date and End Date) in some cases, as shown in the screenshot below:

To do this, apply the code below to the Label’s Text property as:
Concatenate(
Text(
DateDiff(
dtStartDate.SelectedDate,
dtEndDate.SelectedDate,
TimeUnit.Hours
)
),
":",
Text(
DateDiff(
dtStartDate.SelectedDate,
dtEndDate.SelectedDate,
TimeUnit.Minutes
)
),
":",
Text(
DateDiff(
dtStartDate.SelectedDate,
dtEndDate.SelectedDate,
TimeUnit.Seconds
)
)
)
dtStartDate, dtEndDate = Date Pickers for Start and End Date

Once you save and preview the app, you can view the result in the label control as shown above.
I hope this post helped you understand how to calculate days between dates in Power Apps—whether you’re using date pickers or text input controls. We also looked at how to calculate the difference including hours, minutes, and seconds for more precise timing. With these tips, you can easily add date calculations to your apps and make them more useful.
Also, you may like some more Power Apps tutorials:
- Calculate Age in Power Apps
- Calculate Percentage in Power Apps
- Create a Plan Using Power Apps Plan Designer
- Delete All Records From Dataverse Table
- Create a Responsive Navigation Menu in Power Apps
- Show Repeating Table Data From SharePoint List in Power Apps

Hey! I’m Bijay Kumar, founder of SPGuides.com and a Microsoft Business Applications MVP (Power Automate, Power Apps). I launched this site in 2020 because I truly enjoy working with SharePoint, Power Platform, and SharePoint Framework (SPFx), and wanted to share that passion through step-by-step tutorials, guides, and training videos. My mission is to help you learn these technologies so you can utilize SharePoint, enhance productivity, and potentially build business solutions along the way.