SparkR (version 2.1.2)

unix_timestamp: unix_timestamp

Description

Gets current Unix timestamp in seconds.

Usage

unix_timestamp(x, format)

# S4 method for missing,missing unix_timestamp(x, format)

# S4 method for Column,missing unix_timestamp(x, format)

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

Arguments

x

a Column of date, in string, date or timestamp type.

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_unixtime, from_utc_timestamp, hour, last_day, minute, months_between, month, next_day, quarter, second, to_date, to_utc_timestamp, weekofyear, window, year

Examples

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

Run the code above in your browser using DataLab