Yes, the date_sub()
function is the right for the question, anyway, there's an error in the selected answer:
Return type: timestamp
The return type should be date
instead, date_sub() function will trim any hh:mm:ss
part of the timestamp, and returns only a date
.