Converts string dates that may be in serial (using the Microsoft Excel offset),
"d/m/y" (e.g., "01/01/00"), or "d/m/Y" format (e.g., "01/01/2000") into numeric
serial dates. Two-digit years are expanded using a specified century and pivot year.
Usage
AS.dmyY.to.Excel(input, century, pivot)
Arguments
- input
String vector of dates in serial, "d/m/y" or "d/m/Y" format.
- century
Numeric century (e.g., 20) used for expanding two-digit years.
- pivot
Numeric threshold where two-digit years > pivot
are expanded
with century - 1
.
Value
Numeric vector of serial dates using the Microsoft Excel offset.
Examples
print(AS.dmyY.to.Excel(c("01/01/00", "01/01/2000", "36526"), 20, 25))
#> [1] 36526 36526 36526