from datetime import datetime


def convert_date(date: str) -> datetime:
    """Convert a string representing a date and time to a datetime object"""
    date_object = datetime.strptime(date, '%Y-%m-%d %H:%M:%S')
    return date_object