cancel
Showing results for
Search instead for
Did you mean:
Regular Visitor

## Converting Date into Days Number format

Want to convert date to its Days Number format as is shown in Excel popup for formatting cell. I want to enumerate days between Arrival Date & Departure Date for further calculations. Screen Shot attached to clarify my query.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Regular Visitor

Dear Sir Hardit Bhatia,

Thanks for help.

KUDOS!!!

Super User
@k16744

Glad I could help! Good luck with the rest of your app! Feel free to reach out in case of any questions!

Please accept the reply that helped you as the solution so others can find the solution easily. Also, please consider giving kudos (thumbs up) for any and every reply that helped you!

Thanks,
Hardit Bhatia
The Power Addict
https://thepoweraddict.com
6 REPLIES 6
Super User
If your eventual goal is to calculate difference in days between two dates, I suggest you use the DateDiff function.

Here is more info about it: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-dateadd-datediff#des...

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com
Super User
Datevalue(Datefield.SelectedDate)
Super User

The idea proposed by @PowerAddict is correct.  If you want to show exactly the same number as in your picture use this code.

``DateDiff(Date(1900,1,0),Today(),Days)+1``

The output will be a number

``43876``

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Super User
And just to add to that, if the eventual goal is to calculate the difference between Arrival Date and Departure Date, you can simply use DataDiff to do that:

DataDiff(ArrivalDate, DepartureDate) will give you DepartureDate-ArrivalDate

DateDiff(DepartureDate, ArrivalDate) will give you ArrivalDate-DepartureDate

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
https://thepoweraddict.com
Regular Visitor

Dear Sir Hardit Bhatia,

Thanks for help.

KUDOS!!!

Super User
@k16744

Glad I could help! Good luck with the rest of your app! Feel free to reach out in case of any questions!

Please accept the reply that helped you as the solution so others can find the solution easily. Also, please consider giving kudos (thumbs up) for any and every reply that helped you!

Thanks,
Hardit Bhatia
The Power Addict
https://thepoweraddict.com

## Helpful resources

Announcements

#### Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

#### June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

#### Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

#### New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (1,056)