date456posix
date456posix(x, century)
x | numeric where the first 1-2 digits specify the month attribute because leading zeros have been stripped |
---|---|
century | numeric century recommended choice of "19" or "20" |
Warning! Entries with a "real" two digit month but a "false" one digit day will assume that the return value should be a "false" one digit month and a "real" two digit day. For example, "10/6/2016" will return "2016-01-06". Consider using the mdy2mmyyy
function instead.
mdy2mmyyy
dates <- c("51514", "101214", "8714", "1214", "81412", "2315") date456posix(dates, century = "20") #> [1] "2014-05-15 UTC" "2014-10-12 UTC" "2014-08-07 UTC" "2014-01-02 UTC" #> [5] "2012-08-14 UTC" "2015-02-03 UTC"