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

SQL Anywhere 11.0.1 (Français) » QAnywhere » QAnywhere Reference » QAnywhere C++ API reference » QAMessage class


getTimestamp function

qa_long QAMessage::getTimestamp()

Gets the message timestamp.

This 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. It is in units that are natural for the platform. For Windows/PocketPC platforms, the timestamp is a SYSTEMTIME, converted to a FILETIME, which is copied to a qa_long value.

To convert a timestamp ts to SYSTEMTIME for displaying to a user, run the following code:

SYSTEMTIME      stime;
FILETIME        ftime;
time.QuadPart = ts;
memcpy(&ftime, &time, sizeof(FILETIME));
FileTimeToSystemTime(&ftime, &stime);

For more information about getting and setting message headers and properties, see Introduction to QAnywhere messages.


The message timestamp.