Forum Discussion

hans3400's avatar
hans3400
Helper I
3 years ago
Solved

Difference between two dates (power query)

Hi   I want to make a column with difference between two date colums. I know i can use =duration.days(date1-date2), but the thing is that one of my date colums also contains time. When I enter in t...
  • Bifinity_75's avatar
    3 years ago

    Hi hans3400 , insert a custom column, and write this formule:

    [Date 2]-Date.From([Date 1])

    When Date 1 y the date with hours, and Date 2 is the normal date (without hours).

     

    The result:

     

    Best regards

  • AntrikshSharma's avatar
    3 years ago

    hans3400 Use Date.From on the datetime column

     

    Duration.Days ( Date.From ( [date1] ) - [date2] )