HealthServiceDateTime Class

Definition

Represents a date and time.

public class HealthServiceDateTime : Microsoft.Health.ItemTypes.HealthRecordItemData, IComparable, IComparable<DateTime>, IComparable<Microsoft.Health.ItemTypes.HealthServiceDateTime>
Inheritance
HealthServiceDateTime
Implements

Remarks

A HealthServiceDateTime is different from a DateTime in that the time is optional and it can be determined if it was specified. Also, the time zone is optional and is not interpreted in any way by HealthVault.

Constructors

HealthServiceDateTime()

Creates a new instance of the HealthServiceDateTime class with the date set to the current date and the time not set.

HealthServiceDateTime(HealthServiceDate)

Creates a new instance of the HealthServiceDateTime class with the specified date.

HealthServiceDateTime(DateTime)

Creates a new instance of the HealthServiceDateTime class from the specified DateTime instance.

HealthServiceDateTime(HealthServiceDate, ApproximateTime)

Creates a new instance of the HealthServiceDateTime class with the specified date and time.

HealthServiceDateTime(HealthServiceDate, ApproximateTime, CodableValue)

Creates a new instance of the HealthServiceDateTime class with the specified date, time, and time zone.

Properties

Date

Gets or sets the date.

Time

Gets or sets the time.

TimeZone

Gets or sets the time zone.

Methods

CompareTo(HealthServiceDateTime)

Compares the specified object to this HealthServiceDateTime object.

CompareTo(DateTime)

Compares the specified object to this HealthServiceDateTime object.

CompareTo(Object)

Compares the specified object to this HealthServiceDateTime object.

Equals(Object)

Gets a value indicating whether the specified object is equal to this object.

GetHashCode()

See the base class documentation.

ParseXml(XPathNavigator)

Populates the data for the date and time from the XML.

ToDateTime()

Converts the HealthServiceDateTime instance to a System.DateTime object.

ToString()

Gets the date and time as a string.

WriteXml(String, XmlWriter)

Writes the date and time to the specified XML writer.

Operators

Equality(HealthServiceDateTime, Object)

Gets a value indicating whether the specified object is equal to the specified date.

Explicit(HealthServiceDateTime to DateTime)

Casts the HealthServiceDateTime instance to a System.DateTime object.

GreaterThan(HealthServiceDateTime, Object)

Gets a value indicating whether the specified date is greater than the specified object.

Inequality(HealthServiceDateTime, Object)

Gets a value indicating whether the specified object is not equal to the specified date.

LessThan(HealthServiceDateTime, Object)

Gets a value indicating whether the specified date is less than the specified object.