Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ymd

Format a Date(time) object as ymd


Description

Format a Date(time) object as ymd

Usage

ymd(pt)

Arguments

pt

A POSIXt Datetime or a Date object

Value

A character object formatted as ‘YYYYMMDD’

Author(s)

Dirk Eddelbuettel

Examples

if (requireNamespace("anytime", quietly=TRUE)) {
   ymd(anytime::anytime("2016-09-01 10:11:12.123456"))
   ymd(anytime::anydate("2016-Sep-01"))
}

dang

'Dang' Associated New Goodies

v0.0.13
GPL (>= 2)
Authors
Dirk Eddelbuettel with contributions by Brodie Gaslam, Kevin Denny, Kabira Namit, Colin Gillespie, R Core, Josh Ulrich, and others.
Initial release
2021-02-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.