computeCtime_hours: Calculates the difference between two dates in hours

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/xpssComputeDates.R

Description

R Implementation of the SPSS CTIME.HOURS Function. computeCtime_hours is a helper function for xpssCompute.

Usage

1

Arguments

x

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

date

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

Details

The input format of date's with timeparameter's is YYYY-MM-DD HH:MM:SS. All parameters are necessary to calculate the hour difference!

Value

Returns the difference between date and x in hours.

Author(s)

Bastian Wiessner

See Also

difftime DateTimeClasses as.POSIXlt strptime

Examples

1
2
xpssCompute(x="2013-09-14 12:12:12", fun="computeCtime_hours", date="2013-09-14 10:10:10")
xpssCompute(x="2013-09-14 12:12:12", fun="computeCtime_hours", date="2013-09-06 22:10:10")

translateSPSS2R documentation built on May 30, 2017, 4:31 a.m.