Rdate2str | R Documentation |
str2Rdate: Convert a string representation of a date-time into an R date-time object of type (POSIXt, POSIXct).
Rdate2str: Convert an R date-time object into a string of a desired string format.
Rdate2str(date, format = "%Y-%m-%d %H:%M:%S")
str2Rdate(ts, format = "%Y-%m-%d %H:%M:%S")
date |
a date-time object of type POSIXt, POSIXct |
ts |
a date-time string having the format of |
format |
the format to be used for the output string. For the
list of items see the help page of |
These functions invoke the built-in functions format
,
as.POSIXct
and strptime
.
str2Rdate: a date-time object of R (POSIXt, POSIXct) which is essentially the number of seconds since some fixed time. Rdate2str: a string with a sequence of the sort year - month - day - time following the format specification in argument format.
Christoph Frei
year
, month
, day
hello.e <- str2Rdate("1977.09.28", format="%Y.%m.%d")
Rdate2str(hello.e-5597*86400,format="%Y-%m-%d")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.