Learn R Programming

translateSPSS2R (version 1.0.0)

computeXdate_date: Extracts the date out of a date string.

Description

R Implementation of the SPSS XDATE.DATE Function. computeXdate_date is a helper function for xpssCompute.

Usage

computeXdate_date(x=NULL)

Arguments

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

Value

Returns a character string with date values.

Details

computeXdate_date extract the complete date out of the date string, the time componentes will be omitted.

See Also

computeXdate_hour computeDate_wkyr

Examples

Run this code
xpssCompute(x="2015-02-15 20:22:20", fun="computeXdate_date")
xpssCompute(x="2022-02-20 21:22:12", fun="computeXdate_date")

Run the code above in your browser using DataLab