Calculates the quarter on basis of a given date

Share:

Description

R Implementation of the SPSS XDATE.QUARTER Function. computeXdate_quarter is a helper function for xpssCompute.

Usage

1

Arguments

x

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

Details

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

Value

Returns a character string with the quarter component.

Author(s)

Bastian Wiessner

See Also

computeXdate_date computeDate_wkyr

Examples

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

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