'If value appears to be something datetime-like, return it in ISO format.
Otherwise, return None.'

def _iso_datetime(self, value):

    if hasattr(value, u'strftime'):
        if hasattr(value, u'hour'):
            return value.isoformat()
        else:
            return (u'%sT00:00:00' % value.isoformat())
