date2num: translate character dates to numeric dates

View source: R/date2num.R

date2numR Documentation

translate character dates to numeric dates

Description

convert character dates to numeric dates (seconds since UNIX epoch by default).

Usage

date2num(d, tz = "UTC", ...)

Arguments

d

a character vector of dates

tz, format

as expected by as.POSIXct.

...

any other good stuff you want to pass to as.POSIXct.

Note

beware if you open any csvs in excel and re-save, the dates will likely be put into an absurb ambiguous form. additionally, seconds tend to be obliterated.

See Also

as.POSIXct

Other date manipulators: num2date()

Examples

date2num("1988-03-12 07:00:00", tz = "UTC", format = "%Y-%m-%d %H:%M:%S")

williamcioffi/chf documentation built on June 9, 2022, 5:38 p.m.