stamp: Stamp a date time object based on format of a string

Description Usage Arguments Examples

Description

Stamp a date time object based on format of a string

Usage

1
  stamp(string, date_tm = Sys.time())

Arguments

string

format to display the date time object

date_tm

the date time object to display

Examples

1
2
3
4
5
6
7
8
ex = as.POSIXct("2011-10-26 13:38:48 EST")
stamp("jan 1, 1999", ex)           #= "Oct 26, 2011"
stamp("Jan 01", ex)                #= "Oct 26"
stamp("Sunday, May 1, 2000", ex)   #= "Wednesday, October 26, 2011"
stamp("Sun Aug 5", ex)             #= "Wed Oct 26"
stamp("12/31/99", ex)              #= "10/26/11"
stamp("DOB:12/11/00", ex)          #= "DOB:10/26/11"
stamp("15 Oct at 2:30 PM", ex)     #= "26 Oct at  1:38 PM"

ramnathv/intellidate documentation built on May 26, 2019, 10:14 p.m.