vasista
vasista

Reputation: 184

Dateparser date parsing strange issue

dateparser.parse("03 AUGUST 2018, 00:26 AM IST")

Try parsing the above date with dateparser. I have been using dateparser from 3 months, I choose these module because it supports multi languge. But I have faced something strange today. It could parse anything but not this. I have changed the months, but no luck. Can anyone say, why is this? how to approach to solve the problem? It works only when I remove "AM/PM" from this kind of format.

Upvotes: 0

Views: 370

Answers (1)

Sid Ali
Sid Ali

Reputation: 1857

Actually this format is false, you are writing in 24-hour format (from 0 to 23) where there is no AM/PM. If you want add AM/PM so you have to go with the 12hour format ( from 1 to 12, with AM/PM)

Check this table

Upvotes: 1

Related Questions