python salesforce beatbox: beatbox._beatbox.SoapFaultError: 'INVALID_FIELD'
Question: I am using [beatbox](http://www.pocketsoap.com/beatbox/) to connect to
Salesforce from Python and it works fine until I try to add constraint with
dates.

When I add a CreatedDate constraint it fails saying

    
    
    File "/Library/Python/2.7/site-packages/beatbox/_beatbox.py", line 332, in post
        raise SoapFaultError(faultCode, faultString)
    beatbox._beatbox.SoapFaultError: 'INVALID_FIELD' "INVALID_FIELD: from Assets__c where CreatedDate > 2012-08-08 ^ ERROR at Row:1:Column:1061 value of filter criterion for field 'CreatedDate' must be of type dateTime and should not be enclosed in quotes"
    

  * How can I send a datetype object to query and fix this?


Answer: This will give you a datetime object:

    
    
    import datetime
    
    def return_datetime(year, month, day):
        return datetime.datetime(year, month, day)
    
    date = return_datetime(2012, 8, 12)
    

