unix_timestamp {SparkR}R Documentation

unix_timestamp

Description

Gets current Unix timestamp in seconds.

Usage

unix_timestamp(x, format)

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

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

## S4 method for signature '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.

Note

unix_timestamp since 1.5.0

unix_timestamp(Column) since 1.5.0

unix_timestamp(Column, character) since 1.5.0

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_timestamp, to_utc_timestamp, weekofyear, window, year

Examples

## Not run: 
##D unix_timestamp()
##D unix_timestamp(df$t)
##D unix_timestamp(df$t, 'yyyy-MM-dd HH')
## End(Not run)

[Package SparkR version 2.2.2 Index]