fork download
  1. data_de_nascimento = c("16/03/66", "11/06/87", "21/11/75", "05/09/70",
  2. "15/08/70", "15/08/70")
  3. d <- as.Date(data_de_nascimento, "%d/%m/%y" )
  4. data_de_nascimento_format <- as.Date(
  5. ifelse(d > Sys.Date(), format(d, "19%y-%m-%d"), format(d)))
  6.  
  7. head(data_de_nascimento_format)
Success #stdin #stdout 0.45s 79168KB
stdin
Standard input is empty
stdout
[1] "1966-03-16" "1987-06-11" "1975-11-21" "1970-09-05" "1970-08-15"
[6] "1970-08-15"