Timestamp Property  
 

Returns the date and time the last response was received.

Syntax

object.Timestamp

Remarks

The Timestamp property returns the local date and time the most recent response was received from the provider. The value is formatted using the current user's regional date and time settings.

This property is updated after a successful call to the Ask or SendMessage method. If no response has been received, this property will return an empty string.

The timestamp represents when the response was received by the control, not necessarily when the response was generated by the provider. Some providers may also include their own internal timestamps as part of the response metadata, but those values are not returned by this property.

Because the value returned by this property is formatted using the current user's locale settings, the exact format of the date and time string may vary between systems. Applications that require locale-independent date and time handling should store or convert the value using an appropriate date and time format.

This property only reflects the timestamp associated with the most recent response. Applications can retrieve timestamp values for messages stored in the conversation history by using the GetFirstMessage, GetNextMessage or GetMessage methods.

Data Type

String

Example

Dim strResponse As String
Dim dtResponse As Date

strResponse = LlmClient1.Ask("What is the capital of Denmark?")
If Len(strResponse) > 0 Then
    ' Display the message timestamp using a custom format
    dtResponse = CDate(LlmClient1.Timestamp)
    MsgBox Format$(dtResponse, "yyyy-mm-dd hh:nn:ss"), vbInformation
End If

See Also

ElapsedTime Property, MessageId Property, Response Property, Ask Method, GetFirstMessage Method, GetMessage Method, GetNextMessage Method, SendMessage Method