Class DBDateTime
Inheritance
System.Object
DBDateTime
Assembly: DeephavenOpenAPI.dll
Syntax
public class DBDateTime : object
Constructors
DBDateTime(Int32, Int32, Int32)
Declaration
public DBDateTime(int year, int month, int day)
Parameters
Type |
Name |
Description |
System.Int32 |
year |
|
System.Int32 |
month |
|
System.Int32 |
day |
|
DBDateTime(Int32, Int32, Int32, Int32, Int32, Int32)
Declaration
public DBDateTime(int year, int month, int day, int hour, int minute, int second)
Parameters
Type |
Name |
Description |
System.Int32 |
year |
|
System.Int32 |
month |
|
System.Int32 |
day |
|
System.Int32 |
hour |
|
System.Int32 |
minute |
|
System.Int32 |
second |
|
DBDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int64)
Declaration
public DBDateTime(int year, int month, int day, int hour, int minute, int second, long nanos)
Parameters
Type |
Name |
Description |
System.Int32 |
year |
|
System.Int32 |
month |
|
System.Int32 |
day |
|
System.Int32 |
hour |
|
System.Int32 |
minute |
|
System.Int32 |
second |
|
System.Int64 |
nanos |
|
Fields
EpochTime
Declaration
public static readonly DateTime EpochTime
Field Value
Type |
Description |
DateTime |
|
NanosPerTick
Declaration
public const long NanosPerTick = null
Field Value
Type |
Description |
System.Int64 |
|
Properties
Nanos
Declaration
public long Nanos { get; }
Property Value
Type |
Description |
System.Int64 |
|
Methods
FromDateTime(Nullable<DateTime>)
Converts Nullable<DateTime> to DBDateTime. Assumes the DateTime is in UTC.
Declaration
public static DBDateTime FromDateTime(DateTime? dt)
Parameters
Type |
Name |
Description |
System.Nullable<DateTime> |
dt |
|
Returns
FromNanos(Int64)
Converts nanos-since-UTC-epoch to DBDateTime. Understands Deephaven null value sentinel.
Declaration
public static DBDateTime FromNanos(long nanos)
Parameters
Type |
Name |
Description |
System.Int64 |
nanos |
|
Returns
ToDateTime(DBDateTime)
Converts DBDateTime to the Nullable<DateTime>. Understands null values. Note that this is a
lossy conversion, because .NET's DateTime object has a resolution of 100 ns.
Declaration
public static DateTime? ToDateTime(DBDateTime dt)
Parameters
Returns
Type |
Description |
System.Nullable<DateTime> |
|
ToNanos(DBDateTime)
Converts DBDateTime to a nanos-since-UTC-epoch. Understands null values.
Declaration
public static long ToNanos(DBDateTime dt)
Parameters
Returns
Type |
Description |
System.Int64 |
|
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Extension Methods