FabianRoger / AoB_Butterflies

0 stars 0 forks source link

Some dates are erronous #4

Closed FabianRoger closed 3 years ago

FabianRoger commented 3 years ago
RMO$date[is.na(as.numeric(RMO$date))][is.na(as.Date(RMO$date[is.na(as.numeric(RMO$date))], format = "%Y-%m-%d"))]

This line of code gives you the dates that have (for some reason) not been transformed to numeric when importing from excel and cannot be converted to date in the %Y-%m-%d format.

The dates are "2010-20-08" "2018-06-31"

I guess the first date in %Y-%d-%m. The second date is impossible. replace it by 2018-07-01?

larspett commented 3 years ago

Yes to both! I remember that 0631 from when we imported to our database