Learn R Programming

translateSPSS2R (version 1.0.0)

computeXdate_tday: Calculates the difference of days between the entered date and October 14, 1582.

Description

R Implementation of the SPSS XDATE.DAY Function. computeXdate_tday is a helper function for xpssCompute.

Usage

computeXdate_tday(x=NULL)

Arguments

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

Value

Returns a character string with difference of days between the dates.

Details

computeXdate_tday calculates the difference of days between October 14, 1582 and the entered date.

See Also

computeXdate_date computeDate_wkyr

Examples

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

Run the code above in your browser using DataLab