get_timestamp: Create a time stamp of now as character string for use in...

Description Usage Arguments Value Examples

View source: R/get_timestamp.R

Description

This function is intended for use in building file names for exports. It creates a time stamp based on now.

Usage

1
2
get_timestamp(time = F, string.date = "%Y-%m-%d",
  string.datetime = "%Y-%m-%d_%H%M%S")

Arguments

time

A boolean flag to determine whether the time should be included in the time stamp

string.date

A character string defining a pure date format to return as time stamp.

string.datetime

A character string defining a date/time format to return as time stamp.

Value

A character string with the time stamp.

Examples

1
2
3
4
5
6
7
8
9
get_timestamp()

get_timestamp(T)

# change date format
get_timestamp(string.date = '%d-%m-%Y')

# change date/time format
get_timestamp(T, string.datetime = '%d-%m-%Y-%H%M')

matt-jay/rjaytools documentation built on May 28, 2019, 8:45 a.m.