def get_datetime(filename):
    """Reads and generates datetime
    Youtube compatible datetime format"""

    # Opening and reading the date file
    file = open(filename, "r+")
    date = file.read()

    # Appending 0 to date if less than 10
    if int(date) < 10:
        date = "0" + date

    # Youtube compatible datetime format
    datetime = "2021-08-" + date + "T00:00:00Z"

    # Closing the file
    file.close()

    return datetime