Skip to contents

Change a numeric value to a date object by specifying a date of origin.

Usage

numericToDate(x, date.origin = DATE.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 numeric object.

See also

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

Author

Samuel Leung

Examples

numericToDate(10)
#> [1] "1970-01-11"
numericToDate(10, "2000-09-11")
#> [1] "2000-09-21"