SparkR (version 2.1.2)

from_unixtime: from_unixtime

Description

Converts the number of seconds from unix epoch (1970-01-01 00:00:00 UTC) to a string representing the timestamp of that moment in the current system time zone in the given format.

Usage

from_unixtime(x, ...)

# S4 method for Column from_unixtime(x, format = "yyyy-MM-dd HH:mm:ss")

Arguments

x

a Column of unix timestamp.

...

further arguments to be passed to or from other methods.

format

the target format. See Customizing Formats for available options.

See Also

Other datetime_funcs: add_months, date_add, date_format, date_sub, datediff, dayofmonth, dayofyear, from_utc_timestamp, hour, last_day, minute, months_between, month, next_day, quarter, second, to_date, to_utc_timestamp, unix_timestamp, weekofyear, window, year

Examples

Run this code
# NOT RUN {
from_unixtime(df$t)
from_unixtime(df$t, 'yyyy/MM/dd HH')
# }

Run the code above in your browser using DataLab