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.