Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

format.chron

Format a chron object


Description

Format a chron object.

Usage

## S3 method for class 'chron'
format(x, format = att$format, origin. = att$origin,
       sep = " ",  simplify, enclosed = c("(", ")"), ...)

Arguments

x

A chron object.

format

As in chron or a single character string with percent codes as detailed in strptime.

origin.

As in chron.

sep

A character string that separates the dates and times in the output. Ignored if percent codes are used in format.

simplify

As in format.dates. Ignored if percent codes are used in format.

enclosed

A character vector of length 2 containing the strings that begin and end each output date/time. Ignored if percent codes are used in format.

...

Not currently used.

Value

A character vector.

See Also

Examples

format(chron(0, 0), c("yy/m/d", "h:m:s"), sep = "T", enclose = c("", ""))
format(chron(0, 0), "%Y-%m-%dT%H:%M:%S") # same

chron

Chronological Objects which can Handle Dates and Times

v2.3-56
GPL-2
Authors
David James [aut] (S original), Kurt Hornik [aut, trl, cre] (<https://orcid.org/0000-0003-4198-9911>), Gabor Grothendieck [ctb], R Core Team [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.