(value)
return datetime.datetime.strptime(value, '%Y-%m-%d').date() if value else None
Convert a ``YYYY-MM-DD`` string to a :class:`datetime.date` object.
Convert a ``YYYY-MM-DD`` string to a :class:`datetime.date` object.
Convert a YYYY - MM - DD string to a : class : datetime . date object .
def parse_date(value):
    """Convert a ``YYYY-MM-DD`` string to a :class:`datetime.date` object."""
    return datetime.datetime.strptime(value, '%Y-%m-%d').date() if value else None
def parse_date ( value ) : return datetime . datetime . strptime ( value , '%Y-%m-%d' ) . date ( ) if value else None