Convert the character representation of the date in an original SDTM dataset to a POSIXct object.
sdtm_dtc_to_datetime.Rd
Convert the character representation of the date in an original SDTM dataset to a POSIXct object.
Usage
sdtm_dtc_to_datetime(x, ...)
# S3 method for list
sdtm_dtc_to_datetime(x, ...)
# S3 method for data.frame
sdtm_dtc_to_datetime(x, date_col_pattern = "DTC$", truncated = 5, ...)
Arguments
- x
The data to convert
- ...
Additional arguments passed to
lubridate::ymd_hms
- date_col_pattern
A regex to search column names for dates to convert.
- truncated
Passed to
lubridate::ymd_hms
Value
The data with the date converted. Note that all dates will be returned as POSIXct objects, so partial dates will appear as the
See also
Other Date management and conversion:
dateany_to_date()
,
generate_dtc()
,
is_ISO8601_calendar_datetime()
,
is_ISO8601_calendar_date()
,
is_ISO8601_ordinal_datetime()
,
is_ISO8601_timezone()
,
is_ISO8601_time()
,
is_ISO8601_week_datetime()
,
make_dy()
,
pattern_ISO8601_any_datetime()
,
pattern_ISO8601_any_date()
,
pattern_ISO8601_calendar_datetime()
,
pattern_ISO8601_calendar_date()
,
pattern_ISO8601_calendar_year()
,
pattern_ISO8601_ordinal_datetime()
,
pattern_ISO8601_ordinal_date()
,
pattern_ISO8601_timezone()
,
pattern_ISO8601_time()
,
pattern_ISO8601_week_datetime()
,
pattern_ISO8601_week_date()
,
sdtm_first_dose()
,
sdtm_time_actual()