-6

How to convert 2015-10-22T22:24:00.000 to the date and time string in the format yyyy-MM-dd hh:mm in order to obtain 2015-10-22 22:24.

Klausos Klausos
  • 15,308
  • 51
  • 135
  • 217

1 Answers1

1

Use dateutil.parser.parse() parse the date string into a timezone aware datetime object, then use strftime() to get the format you want.

For better explanation goto

Community
  • 1
  • 1
Prashant Shukla
  • 742
  • 2
  • 6
  • 19