IfxTimeSpan structure

An IfxTimeSpan represents an offset of a particular length either forward or backward in time. A positive IfxTimeSpan represents an offset forward in time and a negative IfxTimeSpan represents an offset backward in time.

An IfxTimeSpan is treated as if it is made up of a separate value for each of these time units:
  • Day
  • Hour
  • Minute
  • Second
  • Fraction of a second

You can create an IfxTimeSpan that uses only a subset of these time units. This is allowed in order to mimic the behavior of the database server's INTERVAL data type. It does not save any space in memory when you use fewer time units in an IfxTimeSpan.

The largest time unit of an IfxTimeSpan is called the start time unit. The smallest time unit of an IfxTimeSpan is called the end time unit. The start time unit, the end time unit, and all units in between are called the range of the IfxTimeSpan.

Example: If an IfxTimeSpan uses hour, minute, and second units then the start time unit is hour, the end time unit is second, and the range is hour to second.

When creating an IfxTimeSpan you specify time units using the members of the IfxTimeUnit enumeration. For details about this enumeration see IfxTimeUnit enumeration.