to_timestamp {SparkR} | R Documentation |
Converts the column into a TimestampType. You may optionally specify a format according to the rules in: http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html. If the string cannot be parsed according to the specified format (or default), the value of the column will be null. The default format is 'yyyy-MM-dd HH:mm:ss'.
## S4 method for signature 'Column,missing' to_timestamp(x, format) ## S4 method for signature 'Column,character' to_timestamp(x, format) to_timestamp(x, format)
x |
Column to parse. |
format |
string to use to parse x Column to DateType. (optional) |
to_timestamp(Column) since 2.2.0
to_timestamp(Column, character) since 2.2.0
Other datetime_funcs: add_months
,
add_months
,
add_months,Column,numeric-method
;
date_add
, date_add
,
date_add,Column,numeric-method
;
date_format
, date_format
,
date_format,Column,character-method
;
date_sub
, date_sub
,
date_sub,Column,numeric-method
;
datediff
, datediff
,
datediff,Column-method
;
dayofmonth
, dayofmonth
,
dayofmonth,Column-method
;
dayofyear
, dayofyear
,
dayofyear,Column-method
;
from_unixtime
, from_unixtime
,
from_unixtime,Column-method
;
from_utc_timestamp
,
from_utc_timestamp
,
from_utc_timestamp,Column,character-method
;
hour
, hour
,
hour,Column-method
; last_day
,
last_day
,
last_day,Column-method
;
minute
, minute
,
minute,Column-method
;
months_between
,
months_between
,
months_between,Column-method
;
month
, month
,
month,Column-method
;
next_day
, next_day
,
next_day,Column,character-method
;
quarter
, quarter
,
quarter,Column-method
;
second
, second
,
second,Column-method
;
to_date
, to_date
,
to_date
,
to_date,Column,character-method
,
to_date,Column,missing-method
;
to_utc_timestamp
,
to_utc_timestamp
,
to_utc_timestamp,Column,character-method
;
unix_timestamp
,
unix_timestamp
,
unix_timestamp
,
unix_timestamp
,
unix_timestamp,Column,character-method
,
unix_timestamp,Column,missing-method
,
unix_timestamp,missing,missing-method
;
weekofyear
, weekofyear
,
weekofyear,Column-method
;
window
, window
,
window,Column-method
; year
,
year
, year,Column-method
Other datetime_funcs: add_months
,
add_months
,
add_months,Column,numeric-method
;
date_add
, date_add
,
date_add,Column,numeric-method
;
date_format
, date_format
,
date_format,Column,character-method
;
date_sub
, date_sub
,
date_sub,Column,numeric-method
;
datediff
, datediff
,
datediff,Column-method
;
dayofmonth
, dayofmonth
,
dayofmonth,Column-method
;
dayofyear
, dayofyear
,
dayofyear,Column-method
;
from_unixtime
, from_unixtime
,
from_unixtime,Column-method
;
from_utc_timestamp
,
from_utc_timestamp
,
from_utc_timestamp,Column,character-method
;
hour
, hour
,
hour,Column-method
; last_day
,
last_day
,
last_day,Column-method
;
minute
, minute
,
minute,Column-method
;
months_between
,
months_between
,
months_between,Column-method
;
month
, month
,
month,Column-method
;
next_day
, next_day
,
next_day,Column,character-method
;
quarter
, quarter
,
quarter,Column-method
;
second
, second
,
second,Column-method
;
to_date
, to_date
,
to_date
,
to_date,Column,character-method
,
to_date,Column,missing-method
;
to_utc_timestamp
,
to_utc_timestamp
,
to_utc_timestamp,Column,character-method
;
unix_timestamp
,
unix_timestamp
,
unix_timestamp
,
unix_timestamp
,
unix_timestamp,Column,character-method
,
unix_timestamp,Column,missing-method
,
unix_timestamp,missing,missing-method
;
weekofyear
, weekofyear
,
weekofyear,Column-method
;
window
, window
,
window,Column-method
; year
,
year
, year,Column-method
## Not run:
##D to_timestamp(df$c)
##D to_timestamp(df$c, 'yyyy-MM-dd')
## End(Not run)