<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def extract_date(value):
 """ Convert timestamp to datetime and set everything to zero except a date """

    dtime = value.to_datetime()
    dtime = (dtime - timedelta(hours=dtime.hour) - timedelta(minutes=dtime.minute) -
             timedelta(seconds=dtime.second) - timedelta(microseconds=dtime.microsecond))
    return dtime