Skip to contents

Converts string dates that may be in serial (using the Microsoft Excel offset), "d/m/y" (e.g., "31/01/00"), or "d/m/Y" format (e.g., "31/01/2000") into numeric serial dates. Two-digit years are expanded using a specified century and pivot year.

Usage

OR.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.

See also

Other Excelserialdates: OR.mdyY.to.Excel()

Examples

print(OR.dmyY.to.Excel(c("31/01/00", "31/01/2000", "36556"), 20, 25))
#> [1] 36556 36556 36556