ez.date: convert to date

View source: R/basic.R

ez.dateR Documentation

convert to date

Description

convert to date with friendly ori (no need to remember exact origin date)

Usage

ez.date(x, ori = "Excel", format = "%m/%d/%Y", ...)

Arguments

x

a vector of char or num.
a string factor treated as char (ie, using param format), a num factor cannot be processed

ori

one of 'Excel', 'Matlab', 'R', 'SPSS', 'Javascript'. Ignored when x is character

format

specify in date format. Ignored when x is numeric. See examples (cannot have percentage sign here for documentation)

Value

returns a vector

See Also

ez.date ez.is.date ez.is.date.like ez.age ez.time

Examples

# format one of c("%d/%m/%Y", "%d-%m-%Y", "%Y/%m/%d", "%m/%d/%Y", "%Y-%m-%d"). %y for two year digits

jerryzhujian9/ezmisc documentation built on March 9, 2024, 12:44 a.m.