Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. QA Testing
  3. Question
QA Testing

Object of type datetime is not JSON serializable

Asked by Andrea Bailey Apr 3, 2021 926 views 1 answer
Share

About this question

I'm new using Simple_Salesforce for Python and I'm trying to update a record of "Account" and one of the values that I need to update is a Date/Time value, but I'm receiving the error: "Object of type datetime is not JSON serializable" when I use the update method like this:

sf.Account.update(sf_id, {'variable1': value1, 'variable2_Date__c': datetime(2021, 2, 1, 1, 2, 3, tzinfo=timezone.utc)})

What am I doing wrong? Or what do I need to improve in order to do the update?

Your answer

1 Answer

More QA Testing discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest QA Testing Blogs

Guides, tips and career advice on QA Testing from JanBask experts.