-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
  • 14,142
  • 48
  • 129
  • 212

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
  • 674
  • 2
  • 6
  • 18