Forum Discussion

kyrpav's avatar
kyrpav
Helper V
5 years ago
Solved

Comparing Date portion of datetime fields

I want to ask if there is  an sorted way or any build in way in powerbi to compare two field of datetime where the comparison should be done based only on dates.   So to datetimes:  FirstDate: 202...
  • Greg_Deckler's avatar
    Greg_Deckler
    5 years ago

    kyrpav 

    INT(FirstDate)<=INT(SecondDate)

    Date Time values are decimal numbers where the integer portion is the number of days since 12/30/1899 and the time portion is the decimal portion and is in fractions of a day hours/24 + minutes/60 + seconds/3600. So, if you use INT to just return the integer portions to do the comparison, you are good to go.