from datetime import datetime


def convert_date(_x):
    """Extract and reformat datetime string

    :param str _x: Date string to convert

    :return: Date string
    :rtype: datetime
    """

    date = datetime.strptime(_x, '%Y-%m-%d').date()

    return date