APIs & Integrations

Shimi
Member

Python: Problem GET /crm/v3/objects/companies return datetime.datetime() object

Api return datetime.datetime object like below:

{'source_id': 'userId:11135591',
 'source_label': None,
 'source_type': 'CRM_UI',
 'timestamp': datetime.datetime(2022, 7, 18, 19, 9, 37, 153000, tzinfo=tzutc()),
 'updated_by_user_id': 11135591,
 'value': 'Instagram;Texting;Event Planer;Gift Cards'}]

Instead to be:

'timestamp'`:

2022-7-18T19:9:37.615Z

 

0 Upvotes
2 Replies 2
taran42
Contributor

Python: Problem GET /crm/v3/objects/companies return datetime.datetime() object

@Shimi I'm not sure what your code looks like, but below are some resources you can use to format your datetime.

 

https://pynative.com/python-datetime-format-strftime/#:~:text=Use%20datetime.,hh%3Amm%3Ass%20format. 

 

https://www.w3schools.com/python/python_datetime.asp 

Jaycee_Lewis
Community Manager
Community Manager

Python: Problem GET /crm/v3/objects/companies return datetime.datetime() object

HI, @Shimi 👋 Thanks for reaching out. Can you provide any additional details, code snippets, or screenshots to help provide our community with additional information, please? 

 

Hey, @taran42 @JBeatty, do you have any thoughts on specifically what else @Shimi can include to help with troubleshooting via the community? 

 

Best,

Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes