r - Converting dates with a format of d/mm/yy (for years earlier than 69) -


converting character "6/07/69" date using as.date function results in "2068-07-06" instead of "1968-07-06". how can fix this?

example:

as.date(c("6/07/68", "6/07/69"), format="%d/%m/%y") [1] "2068-07-06" "1969-07-06" 

you can use library chron

e.g.

> library(chron) > as.date(chron(c("6/07/67", "6/07/69"), format = c(dates = "m/d/y"))) #[1] "1967-06-07" "1969-06-07" 

Popular posts from this blog

Php - Delimiter must not be alphanumeric or backslash -

c# - How to change the "Applies To" field under folder auditing options programatically (.NET) -

c++ - Ambiguity when using boost::assign::list_of to construct a std::vector -