Learn R Programming

NCmisc (version 1.2.0)

simple.date: Simple representation and retrieval of Date/Time

Description

Retrieve a simple representation of date_time or just date, for generating day/time specific file names, etc.

Usage

simple.date(sep = "_", long = FALSE, time = TRUE)

Value

A string containing the date: MMMDD and optionally time HRam/pm. Or if long=TRUE, a longer representation: DAY MM DD HH.MM.SS YYYY.

Arguments

sep

character, separator to use for the date/time, eg, underscore or <space> " ".

long

logical, whether to display a longer version of the date and time, or just a simple version

time

logical, whether to include the time, or just the date

Examples

Run this code
simple.date()
simple.date(" ",long=TRUE)
simple.date(time=FALSE)

Run the code above in your browser using DataLab