Community Summit Europe | March 9-12, 2020 | Barcelona, Spain Register today
Hi PeterDate and Date/Time fields are essentially the same type of field when they are stored in the database, they are both date and time. The only difference is the way Dynamics shows/interprets the date. So a date field is stored as 01/01/19 00:00:00.000 whereas a date and time field is stored as 01/01/19 10:15:00.000 or similarly. This is compounded by the way the date field is created i.e. user local, time zone independent etc. So if the date field is stored as user local, then a different user in a different timezone looks at the field, it adjusts for that time period e.g. 10am is converted to 7pm when a user looks at it. Then there's daylight savings time which causes other issues. My point is, date and date/time fields are complicated.
I believe the comparison would be done at a SQL level, so take the whole date/time field into account to see whether the date (and time) are before or after what you are comparing. So if you look at both date fields you want to compare, just ensure they are both the same type, either date and time or date, if so, the compare you do is based on this type. You can also add in multiple checks like less than in one row AND Not On, on another row, to ensure the date is earlier but not on the same day.I think this would require a bit of trial and error or Andrews suggestions are also quite useful if you can use them.thanksMatt
If you've found this thread useful, dive deeper into User Group community content by role