Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » QAnywhere » QAnywhere SQL API Reference » Message properties, headers, and content » Message headers

ml_qa_getreplytoaddress Next Page

ml_qa_gettimestamp


Returns the creation time of the message.

Parameters

Item

Description

Remarks

1

Message ID

VARCHAR(128). You can obtain the message ID from ml_qa_createmessage or ml_qa_getmessage.

Return value

The message creation time as TIMESTAMP.

Remarks

The Timestamp header field contains the time a message was created. It is a coordinated universal time (UTC). It is not the time the message was actually transmitted, because the actual send may occur later due to transactions or other client-side queuing of messages.

You can read this header after a message is received and until a rollback or commit occurs; after that you cannot read it.

See also
Example

In the following example, a message is received and the creation time of the message is output to the database console:

begin
    declare @msgid varchar(128);
    declare @ts timestamp;
    set @msgid = ml_qa_getmessage( 'myaddress' );
    set @ts = ml_qa_gettimestamp( @msgid );
    message 'message received with create time: ' || @ts ;
    commit;
end