Learn R Programming

dsmisc (version 0.3.3)

time_stamp: Time Stamps for File Names

Description

Generating file name ready iso time stamps.

Usage

time_stamp(ts = Sys.time(), sep = c("-", "_", "_"))

Arguments

ts

one or more POSIX time stamp

sep

separators to be used for formatting

Value

Returns timestamp string in format yyyy-mm-dd_HH_MM_SS ready to be used safely in file names on various operating systems.

Examples

Run this code
# NOT RUN {
time_stamp()
time_stamp( Sys.time() - 10000 )


# }

Run the code above in your browser using DataLab