Skip to contents

This function returns the current system time formatted according to the provided format string.

Usage

now(format = "%Y-%m-%d %H:%M:%OS2")

Arguments

format

A string representing the desired time format. Default is "%Y-%m-%d %H:%M:%OS2".

Value

A string representing the current system time in the specified format.

Examples

now()            # e.g. "2024-06-12 16:09:32.41"
#> [1] "2024-06-28 07:36:23.89"
now("%H:%M:%S")  # e.g. "16:09:32"
#> [1] "07:36:23"