Forum Discussion
kyrpav
5 years agoHelper V
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...
- 5 years ago
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.
mahoneypat
5 years agoMicrosoft Employee
I believe you can use the INT( ) function for that.
INT([First Date]) <= INT([SecondDate])
Pat