How do you handle a date field

57 views
Skip to first unread message

Todd Lane

unread,
Nov 29, 2017, 7:02:12 PM11/29/17
to PyMySQL Users
Hi,

Newbie here. Have Python code that uses PyMySQL to talk to db. Outputs json for a Lambda function.

Everything working perfect until I add a date field.

error message I am getting 

"errorMessage": "Object of type 'date' is not JSON serializable",

Ive done some research & still cant get my head around it.

Does one modify the field inside the sql statement or do you need to create a variable with the dbfield before running the sql statement?

Thanks in advance for any assistance.

Todd
Reply all
Reply to author
Forward
0 new messages