from datetime import datetime


def format_iso_date(d):
    """
    If the parameter is datetime format as iso, otherwise returns the same value
    """
    if type(d) is datetime:
        return d.isoformat()
    return d