dateparser icon indicating copy to clipboard operation
dateparser copied to clipboard

Unable to parse the simplest case of 20220727

Open redreamality opened this issue 3 years ago • 3 comments

20220727 YYYYMMDD

redreamality avatar Sep 15 '22 11:09 redreamality

Hi @redreamality You can use the date_formats argument to parse the date in this format.

In [1]: import dateparser
In [2]: dateparser.parse('20220721', date_formats=['%Y%m%d'])
Out[2]: datetime.datetime(2022, 7, 21, 0, 0)

serhii73 avatar Oct 12 '22 13:10 serhii73

@redreamality Please let me know if you were able to parse dates in this format using this argument. Thank you.

serhii73 avatar Oct 12 '22 13:10 serhii73

It works using date format though, I thought the highlight of this package is parsing arbitrary date string, wasn't it?

chrome_2022-10-16_23-12-34

redreamality avatar Oct 16 '22 13:10 redreamality