I have a time in the form time = '2022-06-29 07:55:28'
that has the type str
I want to store it in the firebase in the firebase's format. For that I have tried datetime.strptime(time, '%Y %m %d %I:%M:%S%p')
. But I am getting the following error:
ValueError: time data '2022-06-29 07:55:28' does not match format '%Y %m %d %I:%M:%S%p'
Kindly help me out in this. Should I go for momentjs or something similar?