Skip to content


Subversion checkout URL

You can clone with
Download ZIP


parse_date_time fails when the string to parse contains a numeric #232

agstudy opened this Issue · 2 comments

2 participants


This example show the bug:

This fails :

parse_date_time("a1 - 03/03/2014",'dmY')
[1] NA
Warning message:
All formats failed to parse. No formats found.

Or this works fine :

parse_date_time("a - 03/03/2014",'dmY')
[1] "2014-03-03 UTC"

Looks like if the string (other than dates) contain numeric the parser fails.


This is by design. The only way to make flexible matching like ymd("a - 03/03/2014") to work is by adding some assumption. The main assumption is that the string doesn't contain numerics other than the date. Ether gsub your a1 from the strings or use explicit strptime or fast_strptime.

@vspinu vspinu closed this

Well. but I think that this should be clearly mentioned in the documentation.
Yes we can preprocess data using gsub , but I don't get your point concerning strptime/fast_strptime?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.