OracleIntervalDS Structure
The OracleIntervalDS structure represents the Oracle INTERVAL DAY TO SECOND data type to be stored in or retrieved from a database. Each OracleIntervalDS stores a period of time in term of days, hours, minutes, seconds, and fractional seconds.
Class Inheritance
System.Object
System.ValueType
Oracle.DataAccess.Types.OracleIntervalDS
Declaration
// C# public struct OracleIntervalDS : IComparable, INullable, IXmlSerializable
Requirements
| Provider | ODP.NET, Unmanaged Driver | ODP.NET, Managed Driver | ODP.NET Core |
|---|---|---|---|
|
Assembly |
|
|
|
|
Namespace |
|
|
|
|
.NET Framework |
- |
||
|
.NET (Core) |
- |
- |
Thread Safety
All public static methods are thread-safe, although instance methods do not guarantee thread safety.
Example
// C#
using System;
using Oracle.DataAccess.Types;
class OracleIntervalDSSample
{
static void Main()
{
OracleIntervalDS iDSMax = OracleIntervalDS.MaxValue;
double totalDays = iDSMax.TotalDays;
totalDays -= 1;
OracleIntervalDS iDSMax_1 = new OracleIntervalDS(totalDays);
// Calculate the difference
OracleIntervalDS iDSDiff = iDSMax - iDSMax_1;
// Prints "iDSDiff.ToString() = +000000000 23:59:59.999999999"
Console.WriteLine("iDSDiff.ToString() = " + iDSDiff.ToString());
}
}