cancel
Showing results for
Did you mean:
Highlighted
Helper II

## Calculate no.of days from two different dates

Hi All,

How to Calculate no.of days from two different dates. (e.g 2019-07-13 and 2020-01-10) There is the year changed.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support

## Re: Calculate no.of days from two different dates

Hi,

Please try to create three calculated columns:

``Year difference = DATEDIFF('Table'[DateStart],'Table'[DateEnd],YEAR)``
``Month difference = DATEDIFF('Table'[DateStart],'Table'[DateEnd],MONTH)``
``Day difference = DATEDIFF('Table'[DateStart],'Table'[DateEnd],DAY)``

And the result shows:

Best Regards,

Giotto Zhi

5 REPLIES 5
Highlighted
Super User I

## Re: Calculate no.of days from two different dates

Hi,

Try using DATEDIFF

``Column = DATEDIFF('Table'[Startdate],'Table'[Enddate],DAY)``
Highlighted
Super User IV

## Re: Calculate no.of days from two different dates

datediff(date1,date2,days)

Proud to be a Super User!

Highlighted
Helper II

## Re: Calculate no.of days from two different dates

I tried it but shown only difference from the days but there is a year and the month is different.

Highlighted
Super User IV

## Re: Calculate no.of days from two different dates

datediff(date1,date2,month)

Proud to be a Super User!

Highlighted
Community Support

## Re: Calculate no.of days from two different dates

Hi,

Please try to create three calculated columns:

``Year difference = DATEDIFF('Table'[DateStart],'Table'[DateEnd],YEAR)``
``Month difference = DATEDIFF('Table'[DateStart],'Table'[DateEnd],MONTH)``
``Day difference = DATEDIFF('Table'[DateStart],'Table'[DateEnd],DAY)``

And the result shows:

Best Regards,

Giotto Zhi

Announcements

#### Power Platform Community Conference

Check out the on demand sessions that are available now!

#### Microsoft Power Platform Communities

Check out the Winners!

#### Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

#### Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors