Learn R Programming

translateSPSS2R (version 1.0.0)

computeCtime_minutes: Calculates the difference between two dates in minutes

Description

R Implementation of the SPSS CTIME.MINUTES Function.computeCtime_minutes is a helper function for xpssCompute.

Usage

computeCtime_minutes(x,date)

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

Value

Returns the difference between x and date in minutes.

Details

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

See Also

difftime DateTimeClasses as.POSIXlt strptime

Examples

Run this code
xpssCompute(x="2013-09-14 12:12:12", fun="computeCtime_minutes", date="2013-09-14 10:10:10")
xpssCompute(x="2013-09-14 12:12:12", fun="computeCtime_minutes", date="2013-09-06 22:10:10")

Run the code above in your browser using DataLab