Extracts the year on basis of a given date

Description

R Implementation of the SPSS XDATE.YEAR Function. computeXdate_year is a helper function for xpssCompute.

Usage

1

Arguments

x

atomic object of class character, POSIXlt or POSIXt holding date data.

Details

computeXdate_year extracts the year on basis of the given date string.

Value

Returns a character string with the day of week.

Author(s)

Bastian Wiessner

See Also

computeXdate_date computeXdate_wkday

Examples

1
2
xpssCompute(x="2015-02-15 20:11:20",fun="computeXdate_year")
xpssCompute(x="2022-10-20 21:22:12",fun="computeXdate_year")

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.