View source: R/S03_Utilities.R
date_and_time | R Documentation |
Convenience function to generate a nicely formatted character string with the date and time, typically of the form: YYYY_MM_DD-HH_MM to include as part of a file name. Can convert the character string back into a date and time if needed.
date_and_time(value = NULL, frmt = "%Y_%m_%d-%H_%M")
value |
A character string to convert back into a date-time object. |
frmt |
A character string specifying
the format for the date and time object
(see |
Either 1) a character string with the date and time, to include in a file name, or 2) a date-time object.
string <- date_and_time()
string
# Convert back to date and time object
format( date_and_time( string ), '%Y-%m-%d %H:%M' )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.