Click or drag to resize
Datetime Class
Represents a date and/or time.
Inheritance Hierarchy
SystemObject
  Bloomberglp.BlpapiDatetime

Namespace:  Bloomberglp.Blpapi
Assembly:  Bloomberglp.Blpapi (in Bloomberglp.Blpapi.dll) Version: 3.18.1.1
Syntax
[SerializableAttribute]
public sealed class Datetime : ICloneable

The Datetime type exposes the following members.

Constructors
  NameDescription
Public methodDatetime
Constructs a Datetime object with each part initialized to an unset state.
Public methodDatetime(DateTime)
Creates Datetime object from System.DateTime
Public methodDatetime(Datetime)
Constructs a Datetime object having the same values as specified 'other' Datetime object.
Public methodDatetime(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.
Public methodDatetime(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.
Public methodDatetime(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.
Top
Properties
  NameDescription
Public propertyDayOfMonth
Gets or sets the day of month value of this Datetime object. The 'get' result is undefined unless DayOfMonth is set.
Public propertyHour
Gets or sets the hour value of this Datetime object. The 'get' result is undefined unless Hour is set.
Public propertyMicroSecond
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.
Public propertyMilliSecond
Gets or sets the millisecond value of this Datetime object. The 'get' result is undefined unless MilliSecond is set.
Public propertyMinute
Gets or sets the minute value of this Datetime object. The 'get' result is undefined unless Minute is set.
Public propertyMonth
Gets or sets the month value of this Datetime object. The 'get' result is undefined unless Month is set.
Public propertyNanoSecond
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.
Public propertyParts
Gets a bitmask of all parts that are set in this Datetime object.
Public propertyPicoSecond
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.
Public propertySecond
Gets or sets the second value of this Datetime object. The 'get' result is undefined unless Second is set.
Public propertyTimezoneOffsetMinutes
Gets or sets the timezone offset value of this Datetime object. The 'get' result is undefined unless TimezoneOffsetMinutes is set.
Public propertyYear
Gets or sets the year value of this Datetime object. The 'get' result is undefined unless Year is set.
Top
Methods
  NameDescription
Public methodClear
Sets all parts of this Datetime object to the unset state.
Public methodClone
Create a new Datetime object with the same value as this object.
Public methodEquals
Check value equality. Two values are equal if they have the same parts, and those parts have the same values. e.g. 00:00 is not equal to 00:00:00.
(Overrides ObjectEquals(Object).)
Public methodGetHashCode
Serves as the default hash function. (Inherited from Object.)
(Overrides ObjectGetHashCode.)
Public methodHasParts
Return true if this Datetime object has all of the specified parts set.
Public methodIsValid
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).
Public methodIsValidField Obsolete.
Please use HasParts(Int32) instead.
Public methodSetDate
Sets the date portion of this Datetime object to the specified values.
Public methodSetDatetime(DateTime)
Sets the date, time and portions of this Datetime object using values from the specified System.DateTime.
Public methodSetDatetime(Int32, Int32, Int32, Int32, Int32, Int32, Int32)
Sets the date, time and portions of this Datetime object to the specified values.
Public methodSetDatetimeTz
Sets the date, time and timezone offset portions of this Datetime object to the specified values.
Public methodSetDateTz
Sets the date and timezone offset portions of this Datetime object to the specified values.
Public methodSetTime
Sets the time portions of this Datetime object to the specified values.
Public methodSetTimeTz
Setsthe time and timezone offset portions of this Datetime object to the specified values.
Public methodToString
Converts the Date and Time represented by this Datetime object to String.
(Overrides ObjectToString.)
Public methodToSystemDateTime
Converts this BLP Datetime object into System.DateTime object.
Top
Fields
  NameDescription
Public fieldStatic memberDATE
Date part bitmask.
Public fieldStatic memberDAY_OF_MONTH_PART
Day of month part bitmask.
Public fieldStatic memberHOUR_PART
Hour part bitmask.
Public fieldStatic memberMICROSECOND_PART
Microsecond part bitmask.
Public fieldStatic memberMILLISECOND_PART
Millisecond part bitmask.
Public fieldStatic memberMINUTE_PART
Minute part bitmask.
Public fieldStatic memberMONTH_PART
Month part bitmask.
Public fieldStatic memberNANOSECOND_PART
Nanosecond part bitmask.
Public fieldStatic memberPICOSECOND_PART
Picosecond part bitmask.
Public fieldStatic memberSECOND_PART
Second part bitmask.
Public fieldStatic memberTIME
Time part bitmask without millisecond.
Public fieldStatic memberTIME_ZONE_OFFSET
Timezone offset part bitmask.
Public fieldStatic memberTIMEMILLI
Time part bitmask with millisecond.
Public fieldStatic memberYEAR_PART
Year part bitmask.
Top
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
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also