2012-08-16 31 views
0

我正在使用beatbox從Python連接到Salesforce並且它工作正常,直到我嘗試添加帶日期的約束。python salesforce beatbox:beatbox._beatbox.SoapFaultError:'INVALID_FIELD'

當我添加一個CreatedDate約束它不能說

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" 
  • 我怎麼能發送datetype對象查詢和解決這一問題?

回答

0

這會給你一個DateTime對象:

import datetime 

def return_datetime(year, month, day): 
    return datetime.datetime(year, month, day) 

date = return_datetime(2012, 8, 12)