def process(value):
    if (value is None):
        return None
    elif isinstance(value, datetime_datetime):
        return (format_ % {'year': value.year, 'month': value.month, 'day': value.day, 'hour': value.hour, 'minute': value.minute, 'second': value.second, 'microsecond': value.microsecond})
    elif isinstance(value, datetime_date):
        return (format_ % {'year': value.year, 'month': value.month, 'day': value.day, 'hour': 0, 'minute': 0, 'second': 0, 'microsecond': 0})
    else:
        raise TypeError('SQLite DateTime type only accepts Python datetime and date objects as input.')
def process(value):
    if (value is None):
        return None
    elif isinstance(value, datetime_datetime):
        return (format_ % {'year': value.year, 'month': value.month, 'day': value.day, 'hour': value.hour, 'minute': value.minute, 'second': value.second, 'microsecond': value.microsecond})
    elif isinstance(value, datetime_date):
        return (format_ % {'year': value.year, 'month': value.month, 'day': value.day, 'hour': 0, 'minute': 0, 'second': 0, 'microsecond': 0})
    else:
        raise TypeError('SQLite DateTime type only accepts Python datetime and date objects as input.')