Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


translateSPSS2R (version 1.0.0)

computeXdate_second: Extracts the second on basis of a given date

Description

R Implementation of the SPSS XDATE.SECOND Function. computeXdate_second is a helper function for xpssCompute.

Usage

computeXdate_second(x=NULL)

Arguments

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

Value

Returns a character string with the second component.

Details

computeXdate_second calculates the second component out of the date string, the other date and time componentes will be omitted.

See Also

computeXdate_date computeDate_wkyr

Examples

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

Run the code above in your browser using DataLab