Hunny Software Library Reference

Imap4Utility.ToDateString Method 

Creates an IMAP4 date and time string.

[Visual Basic]
Public Shared Function ToDateString( _
   ByVal dateTime As Date, _
   ByVal zone As TimeSpan _
) As String
[C#]
public static string ToDateString(
   DateTime dateTime,
   TimeSpan zone
);

Parameters

dateTime
A System.DateTime instance with the desired date and time.
zone
The time difference between the represented date and time and UTC. (For example, the standard zone for New York is -5 hours.)

Return Value

A string that contains the date and time in IMAP4 format.

Remarks

You may use this utility method to create an IMAP4 date and time string.

IMAP4 uses this date and time format for the INTERNALDATE message attribute. The format of the IMAP4 date and time string is dd-mmm-YYYY HH:MM:SS ZZZZZ.

Example: 3-May-2004 12:22:04 -0500

You may use the static method FromDateString to parse an IMAP4 date and time string.

See Also

Imap4Utility Class | Hunny.Mail Namespace