date_format {SparkR} | R Documentation |
Converts a date/timestamp/string to a value of string in the format specified by the date format given by the second argument.
## S4 method for signature 'Column,character' date_format(y, x) date_format(y, x)
y |
Column to compute on. |
x |
date format specification. |
A pattern could be for instance
dd.MM.yyyyand could return a string like '18.03.1993'. All pattern letters of
java.text.SimpleDateFormat
can be used.
Note: Use when ever possible specialized functions like year
. These benefit from a
specialized implementation.
date_format since 1.5.0
Other datetime_funcs: add_months
,
add_months
,
add_months,Column,numeric-method
;
date_add
, date_add
,
date_add,Column,numeric-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,Column-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: date_format(df$t, 'MM/dd/yyy')