Forum Discussion

bparikh's avatar
bparikh
Regular Visitor
5 years ago
Solved

Date difference in Months - Power Query

Hello Experts,   I've two DateTime columns and am trying to find the difference in Months by adding a new column but getting an error. I'm using = Date.Month ([Date1] - [Date2]) Date1 & Date2 bot...
  • Fowmy's avatar
    5 years ago

    bparikh 

    if you need the number of months between the dates then add the following, it should work for Date/Time

     = Number.Round(Number.From(([Date 2] - [Date 1])/( 365.25 / 12 )) ,0 )