R/str_datetime.R

#' str_datetime
#'
#' Returns the current date and time, as a formatted string.
#'
#' @param format (character) see [strftime()]
#'
#' @return (character)
#'
#' @export
str_datetime <- function (format = "%Y%m%d-%H%M%S") {
  base::format(Sys.time(), format)
}
BAAQMD/strtools documentation built on Sept. 29, 2024, 9:21 a.m.