You can use the DATEVALUE() formula to convert a DateTime to a Date. Alternatively, you could use NOW() instead of TODAY(). It really depends on the amount of accuracy you want: using NOW() gives you to the second accuracy, while using DATEVALUE() will cause the system to calculate the number of days based on midnight-to-midnight ranges.
TODAY() - DATEVALUE(LastModifiedDate) <= 30 // Accurate to 24 hours
NOW() - LastModifiedDate <= 30 // Accurate to the nearest second
Edit: I just realized that I should mention that using TODAY
/DATEVALUE
will cause users in different time zones to possibly see different values, while using NOW
should result in any user in any time zone seeing the same value. This has to do with the fact that TODAY() and DATEVALUE() convert times to local time zones when used, while using NOW
directly will be time-zone agnostic.
Date
andDatetime
. Try usingNOW
instead ofTODAY
.