I need to assert date time in my test, both of them are not in the same format. Date time in database is in (2021, 5, 10, 0, 0)
and JSON returns date time in '2021-05-10T00:00:00'
.
I'm struggling on how to convert one of the formats so it matches the other and then I can write assert. Any help would be greatly appreciated.
Thanks
x = str(datetime.datetime(2021, 5, 10, 0, 0))
– Joe Ferndz