MAPIQueryDateReceived

Syntax

MAPIQueryDateReceived(DateReceived$)

Remarks

Returns the date and time of the current inbound message.

Argument

Explanation

DateReceived$

A string indicating the date and time a message is received. The format is YYYY/MM/DD HH:MM; hours are measured on a
24-hour clock.


Example

The following example displays the date and time of the first message in the Inbox.


Sub MAIN
MAPI_LOGON_UI = 1
Session = MAPILogon(0, "", "", MAPI_LOGON_UI, 0)
Dim MessageID$, MailDate$
result = MAPIFindNext(Session, 0, "", "", 0, 0, MessageID$)
MAPI_ENVELOPE_ONLY = 64
MAPI_PEEK = 128
Flags = MAPI_ENVELOPE_ONLY + MAPI_PEEK
result = MAPIReadMail(Session, 0, MessageID$, Flags, 0)
result = MAPIQueryDateReceived(MailDate$)
MsgBox MailDate$
result = MAPILogoff(Session, 0, 0, 0)
End Sub