Sometimes you need to compare dates in SQL but you don't want the hours and minutes to count.
2017-01-01 08:30:11
I have seen quite some SQL code using the TO_CHAR function: TO_CHAR(date, 'yyyy-mm-dd'). But this is quite a performance expansive function. Especially if used a lot in the query.
You can use another (much more performant function) : TRUNC
TRUNC(2017-01-01 08:30:11) will give: 2017-01-01 00:00:00 as a result and will allow you to compare dates independently from the hours and minutes as well.
Hope this helps,