Skip to contents

Format MultiQC Config Date

Usage

multiqc_date_fmt(cdate)

Arguments

cdate

String with config date in "YYYY-MM-DD, HH:MM UTC" format.

Value

Properly formatted datetime string in "YYYY-MM-DDTHH:MM:SS" format. If the input string was formatted differently, it will return NA.

Examples

cdate <- "2023-04-07, 09:09 UTC"
(res1 <- multiqc_date_fmt(cdate))
#> [1] "2023-04-07T09:09:00"
(res2 <- multiqc_date_fmt("2023-04-07"))
#> [1] NA
(res3 <- multiqc_date_fmt("UNKNOWN"))
#> [1] NA