from datetime import datetime


def same_date(dt_str, dt):
    """
    :param dt_str:
    :param dt:
    :return: True if dt_str has the same date as dt, False otherwise
    """
    try:
        transformed_datetime = datetime.strptime(dt_str, '%Y-%m-%dT%H:%M:%S.%f')
    except ValueError:
        transformed_datetime = datetime.strptime(dt_str, '%Y-%m-%dT%H:%M:%S')
    return transformed_datetime.date() == dt.date()