Converts the given unix_timestamp into a date-string.

unix_to_datestring(unix_timestamp, out_format = "%Y-%m-%d")

Arguments

unix_timestamp

The unix-timestamp to convert. A unix_timestamp is the number of seconds since the 1st January 1970 (as an integer).

out_format

The format code of the return value. For the specification see section "Details" in help(strptime)

Value

String representing the date corresponding to the unix_timestamp formatted according to out_format.

Examples

unix_to_datestring(0)
#> [1] "1970-01-01"
# 1970-01-01 unix_to_datestring(86400)
#> [1] "1970-01-02"
# 1970-01-02