Bloomberg API for .NET
Datetime Class
NamespacesBloomberglp.BlpapiDatetime
Represents a date and/or time.
Declaration Syntax
C#Visual BasicVisual C++
[SerializableAttribute]
public sealed class Datetime : ICloneable
<SerializableAttribute>
Public NotInheritable Class Datetime
	Implements ICloneable
[SerializableAttribute]
public ref class Datetime sealed : ICloneable
Members
All MembersConstructorsMethodsPropertiesFields



IconMemberDescription
Datetime()()()()
Constructs a Datetime object with each part initialized to an unset state.

Datetime(Datetime)
Constructs a Datetime object having the same values as specified 'other' Datetime object.

Datetime(Int32, Int32, Int32, Int32, Int32, Int32, Int32)
Creates Datetime object having the Date and Time portions set to the specified values. The timezone offset is in the unset state.

Datetime(Int32, Int32, Int32)
Creates Datetime object having the Date portion set to the specified values. The time and timezone offset are in the unset state.

Datetime(Int32, Int32, Int32, Int32)
Creates Datetime object having the Time portion set to the specified values. The Date and timezone offset are in the unset state.

Datetime(DateTime)
Creates Datetime object from System.DateTime

Clear()()()()
Sets all parts of this Datetime object to the unset state.

Clone()()()()
DATE
Date part bitmask.

DAY_OF_MONTH_PART
Day of month part bitmask.

DayOfMonth
Gets or sets the day of month value of this Datetime object. The 'get' result is undefined unless DayOfMonth is set.

Equals(Object) (Overrides Object.Equals(Object).)
GetHashCode()()()() (Overrides Object.GetHashCode()()()().)
HasParts(Int32)
Return true if this Datetime object has all of the specified parts set.

Hour
Gets or sets the hour value of this Datetime object. The 'get' result is undefined unless Hour is set.

HOUR_PART
Hour part bitmask.

IsValid()()()()
Check whether the value of this 'Datetime' object is valid. The behaviour is undefined unless this object represents a date (has YEAR, MONTH and DAY part set) or time (has HOURS, MINUTES, SECONDS and MILLISECONDS part set).

IsValidField(Int32) Obsolete.
MicroSecond
Gets or sets the number of (whole) microseconds in the fraction-of-a-second part of the value of this object. The 'get' result is undefined unless MicroSecond is set.

MICROSECOND_PART
MilliSecond
Gets or sets the millisecond value of this Datetime object. The 'get' result is undefined unless MilliSecond is set.

MILLISECOND_PART
Millisecond part bitmask.

Minute
Gets or sets the minute value of this Datetime object. The 'get' result is undefined unless Minute is set.

MINUTE_PART
Minute part bitmask.

Month
Gets or sets the month value of this Datetime object. The 'get' result is undefined unless Month is set.

MONTH_PART
Month part bitmask.

NanoSecond
Gets or sets the number of (whole) nanoseconds in the fraction-of-a-second part of the value of this object. The 'get' result is undefined unless NanoSecond is set.

NANOSECOND_PART
Parts
Gets a bitmask of all parts that are set in this Datetime object.

PicoSecond
Gets or sets the number of (whole) picoseconds in the fraction-of-a-second part of the value of this object. The 'get' result is undefined unless PicoSecond is set.

PICOSECOND_PART
Second
Gets or sets the second value of this Datetime object. The 'get' result is undefined unless Second is set.

SECOND_PART
Second part bitmask.

SetDate(Int32, Int32, Int32)
Sets the date portion of this Datetime object to the specified values.

SetDatetime(Int32, Int32, Int32, Int32, Int32, Int32, Int32)
Sets the date, time and portions of this Datetime object to the specified values.

SetDatetime(DateTime)
Sets the date, time and portions of this Datetime object using values from the specified System.DateTime.

SetDatetimeTz(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32)
Sets the date, time and timezone offset portions of this Datetime object to the specified values.

SetDateTz(Int32, Int32, Int32, Int32)
Sets the date and timezone offset portions of this Datetime object to the specified values.

SetTime(Int32, Int32, Int32, Int32)
Sets the time portions of this Datetime object to the specified values.

SetTimeTz(Int32, Int32, Int32, Int32, Int32)
Setsthe time and timezone offset portions of this Datetime object to the specified values.

TIME
Time part bitmask without millisecond.

TIME_ZONE_OFFSET
Timezone offset part bitmask.

TIMEMILLI
Time part bitmask with millisecond.

TimezoneOffsetMinutes
Gets or sets the timezone offset value of this Datetime object. The 'get' result is undefined unless TimezoneOffsetMinutes is set.

ToString()()()()
Converts the Date and Time represented by this Datetime object to String.
(Overrides Object.ToString()()()().)
ToSystemDateTime()()()()
Converts this BLP Datetime object into System.DateTime object.

Year
Gets or sets the year value of this Datetime object. The 'get' result is undefined unless Year is set.

YEAR_PART
Year part bitmask.

Remarks
Datetime can represent a date and/or a time or any combination of the components of a date and time. The value is represented as eight parts which can be set or queried independently. These parts are: year; month; day (of month); hour; minute; second; milliseconds and offset (of timezone from GMT in minutes). Methods are provided to set and query the parts individually and in groups. For example, setDate() and setTime(). It is also possible to determine which parts of the Datetime have been set.
Thread Safety
Static members of this type are safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.
Inheritance Hierarchy
Object
Datetime

Assembly: Bloomberglp.Blpapi (Module: Bloomberglp.Blpapi.dll) Version: 3.9.6.1