format_iso8601: Convert date/time components into ISO8601 format

View source: R/dtc_create_iso8601.R

format_iso8601R Documentation

Convert date/time components into ISO8601 format

Description

format_iso8601() takes a character matrix of date/time components and converts each component to ISO8601 format. In practice this entails converting years to a four digit number, and month, day, hours, minutes and seconds to two-digit numbers. Not available (NA) components are converted to "-".

Usage

format_iso8601(m, .cutoff_2000 = 68L)

Arguments

m

A character matrix of date/time components. It must have six named columns: year, mon, mday, hour, min and sec.

.cutoff_2000

An integer value. Two-digit years smaller or equal to .cutoff_2000 are parsed as though starting with 20, otherwise parsed as though starting with 19.

Value

A character vector with date-times following the ISO8601 format.


sdtm.oak documentation built on April 3, 2025, 9:37 p.m.