(date)
return date.isoformat()
Converts a datetime to the ISO8601 format, like: 2014-05-20T06:11:41.733900.

    Parameters:
    date -- a `datetime` instance.
Converts a datetime to the ISO8601 format, like: 2014-05-20T06:11:41.733900.
Converts a datetime to the ISO8601 format like : 2014 - 05 - 20T06 : 11 : 41 . 733900 .
def datetime_to_iso(date):
    """
    Converts a datetime to the ISO8601 format, like: 2014-05-20T06:11:41.733900.

    Parameters:
    date -- a `datetime` instance.
    """
    if not isinstance(date, datetime):
        date = datetime.combine(date, datetime.min.time())
    return date.isoformat()
def datetime_to_iso ( date ) : if not isinstance ( date , datetime ) : date = datetime . combine ( date , datetime . min . time ( ) ) return date . isoformat ( )