Duration.Days Function in Power Query

The Duration.Days function returns the days portion of a duration.

Syntax

Duration.Days(duration as nullable duration) as nullable number

Example: Extract the number of days between two dates.

Power Query M

let
    Source = Duration.Days(#date(2024, 6, 9) - #date(2024, 6, 2))
in
    Source 

The output of the above code is 7.