cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
LaingBennett
Level: Powered On

Calculate number of day between two dates using date pickers

Hi there,

 

I am trying to work out how to calculate the number of days between two dates using date pickers. 

 

The user would pick a start date using one date picker and then an end date using another. 

 

The number of days would be then displayed.

 

Regards

1 ACCEPTED SOLUTION

Accepted Solutions
LaingBennett
Level: Powered On

Re: Calculate number of day between two dates using date pickers

Perfect.

 

Thank you. 

2 REPLIES 2
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Calculate number of day between two dates using date pickers

You can use the DateDiff function for that:

DateDiff(
    DatePicker1.SelectedDate,
    DatePicker2.SelectedDate,
    Days)

The attached app shows this expression with two date pickers. To open it, save it locally, then go to https://create.powerapps.com, select Open -> Browse, and find the file that you saved.

LaingBennett
Level: Powered On

Re: Calculate number of day between two dates using date pickers

Perfect.

 

Thank you. 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 194 members 4,508 guests
Please welcome our newest community members: