How to convert AWSTimestamp
into python DateTime?
I am using AWS AppSync scalar type AWSTimestamp
for datetime
Example:
2021-02-02T16:00:00-07:00
How to convert the above format to python datetime?
How to convert AWSTimestamp
into python DateTime?
I am using AWS AppSync scalar type AWSTimestamp
for datetime
Example:
2021-02-02T16:00:00-07:00
How to convert the above format to python datetime?
Try this - datetime.strptime(date_s, '%Y-%m-%dT%H:%M:%S+00:00')
import dateutil.parser
dt = dateutil.parser.isoparse('2021-02-02T16:00:00-07:00')