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 C++ API Reference » QAMessage class

getStringProperty function Next Page

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:

 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 Message headers and message properties.


The message timestamp.