This is MySQL specific class that is used to represent MySQL TIME data type. More...

Public Member Functions

 SAInterval ()
 Default constructor, initializes to zero.
 
 SAInterval (double dVal)
 Initializes from double.
 
 SAInterval (long nDays, int nHours, int nMins, int nSecs)
 Initializes with defined days, hours, minutes and seconds.
 
 SAInterval (long nDays, int nHours, int nMins, int nSecs, unsigned int nNanoSeconds)
 Initializes with defined days, hours, minutes, seconds and nanoseconds.
 
double GetTotalDays () const
 Returns total days in interval.
 
double GetTotalHours () const
 Returns total hours in interval.
 
double GetTotalMinutes () const
 Returns total minutes in interval.
 
double GetTotalSeconds () const
 Returns total seconds in interval.
 
long GetDays () const
 Returns interval days.
 
long GetHours () const
 Returns interval hours.
 
long GetMinutes () const
 Returns interval minutes.
 
long GetSeconds () const
 Returns interval seconds.
 
unsigned int Fraction () const
 Returns interval nanoseconds.
 
 operator double () const
 Converts interval into double. More...
 
 operator SAString () const
 Converts interval into string (format is [-]HH:MM:SS[.ZZZZZZZZZ])
 
void SetInterval (long nDays, int nHours, int nMins, int nSecs, unsigned int nNanoSeconds)
 Re-initializes with defined days, hours, minutes, seconds and nanoseconds.
 
SAIntervaloperator= (double dVal)
 Re-initializes from double.
 
SAInterval operator+ (const SAInterval &interval) const
 Interval type operator.
 
SAInterval operator- (const SAInterval &interval) const
 Interval type operator.
 
SAIntervaloperator+= (const SAInterval interval)
 Interval type operator.
 
SAIntervaloperator-= (const SAInterval interval)
 Interval type operator.
 
SAInterval operator- () const
 Interval type operator.
 

Detailed Description

This is MySQL specific class that is used to represent MySQL TIME data type.

This class also can be used with SADateTime to represent the difference between two dates.

Member Function Documentation

◆ operator double()

SAInterval::operator double ( ) const

Converts interval into double.