from datetime import datetime


def to_datetime_str(date: datetime) -> str:
    """
    Returns the formated datetime string.
    :: Output example: '2021-07-15T0:0:0Z' FORMAT : "%Y-%m-%dT%H:%M:%SZ"
    """
    return date.strftime("%Y-%m-%dT%H:%M:%SZ")