diff --git a/R/format.R b/R/format.R index cffe4764..6061c87d 100644 --- a/R/format.R +++ b/R/format.R @@ -180,7 +180,7 @@ check_formats <- function(.df, format, verbose) { # check that any variables ending DT, DTM, TM have a format if (identical(format_sas, "")) { - if (isTRUE(grepl("DT$|DTM$|TM$", colnames(.df)[i]))) { + if (isTRUE(grepl("(DT|DTM|TM)$", colnames(.df)[i]))) { message <- glue( "(xportr::xportr_format) {encode_vars(colnames(.df)[i])} is expected to have a format but does not." )