convertToDateTime: Convert character vector to date/time object

Description Usage Arguments Value Author(s)

View source: R/loadDataADaMSDTM.R

Description

Convert character vector to date/time object

Usage

1
2
3
4
5
6
convertToDateTime(
  x,
  format = c("%Y-%m-%dT%H:%M", "%Y-%m-%d"),
  colName = NULL,
  verbose = TRUE
)

Arguments

x

character vector to convert to date/time

format

string with possible format(s) of the input date/time in the ADaM dataset. If multiple are specified, each format is tested successively, until at least one element in the input vector is converted with the specified format (non missing, following the approach described in the format parameter of the strptime function). See the 'Details' section of the help of the function, for more information about this format.

colName

string with name of column, used in message (if any).

verbose

logical, if TRUE (by default) progress messages are printed during execution

Value

Vector of class POSIXct

Author(s)

Laure Cougnaud


clinUtils documentation built on June 8, 2021, 9:06 a.m.