parse_dttm_fmt_ {sdtm.oak} | R Documentation |
Parse a date/time format
Description
parse_dttm_fmt()
parses a date/time formats, meaning it will try to parse
the components of the format fmt
that refer to date/time components.
parse_dttm_fmt_()
is similar to parse_dttm_fmt()
but is not vectorized
over fmt
.
Usage
parse_dttm_fmt_(fmt, pattern)
parse_dttm_fmt(fmt, patterns = fmt_cmp())
Arguments
fmt |
A format string (scalar) to be parsed by |
pattern , patterns |
A string (in the case of |
Value
A tibble of seven columns:
-
fmt_c
: date/time format component. Values are either"year"
,"mon"
,"mday"
,"hour"
,"min"
,"sec"
, orNA
. -
pat
: Regexp used to parse the date/time component. -
cap
: The captured substring from the format. -
start
: Start position in the format string for this capture. -
end
: End position in the format string for this capture. -
len
: Length of the capture (number of chars). -
ord
: Ordinal of this date/time component in the format string.
Each row is for either a date/time format component or a "delimiter" string or pattern in-between format components.