Skip to contents

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