| timestap_dt_str {oaii} | R Documentation |
Convert unix timestamp to formated date/time string
Description
Convert unix timestamp to formated date/time string
Usage
timestap_dt_str(
timestamp,
format = "%Y-%m-%d %H:%M:%S",
tz = "",
usetz = FALSE
)
Arguments
timestamp |
int, unix timestamp value |
format |
A character string. The default for the |
tz |
A character string specifying the time zone to be used for
the conversion. System-specific (see |
usetz |
logical. Should the time zone abbreviation be appended
to the output? This is used in printing times, and more reliable
than using |
Value
The format methods and strftime return character vectors
representing the time. NA times are returned as
NA_character_.
strptime turns character representations into an object of
class "POSIXlt". The time zone is used to set the
isdst component and to set the "tzone" attribute if
tz != "". If the specified time is invalid (for example
‘"2010-02-30 08:00"’) all the components of the result are
NA. (NB: this does means exactly what it says – if it is an
invalid time, not just a time that does not exist in some time zone.)