Share via


EmailMessage.Date Property

The Date property gets or sets the date and time that the message is sent.

Namespace:  Microsoft.Exchange.Data.Transport.Email
Assembly:  Microsoft.Exchange.Data.Transport (in Microsoft.Exchange.Data.Transport.dll)

Syntax

'Declaration
Public Property Date As DateTime
    Get
    Set
'Usage
Dim instance As EmailMessage
Dim value As DateTime

value = instance.Date

instance.Date = value
public DateTime Date { get; set; }

Property Value

Type: System.DateTime
The Date property returns a coordinated universal time (UTC)DateTime value.

Remarks

Setting the Date property of a Multipurpose Internet Mail Extensions (MIME) message to a value of DateTime.MinValue removes the header from the message. When the value of the Date property is set, the EmailMessage object determines the time zone to be either current or UTC, depending on the DateTimeKind of the value.

Note

When you set the value of the Date property by using an instance of the DateTime structure that does not specify DateTimeKind, the Date property assumes that the DateTime instance represents local time.