Skip to contents

Change a numeric value stored as a character string to a date object.

Usage

chr_to_date(x, date.origin = EXCEL.ORIGIN)

Arguments

x

a number that represents the number of days after date.origin

date.origin

the date from which we count the number of days passed

Value

A date object, converted from a character string.

Details

The default date.origin used is the Excel 1900 version.

See also

Other date formatting functions: cleanDate(), formatDate(), getFormat(), numericToDate()

Author

Derek Chiu

Examples

chr_to_date("41041")
#> [1] "2012-05-12"