Skip to main content
Version: 21

Timestamp

Timestamp : Text

ParameterTypeDescription
Function resultTextCurrent time returned using ISO format with milliseconds
History
ReleaseChanges
16 R2Created

Description

Timestamp returns the current UTC time in ISO format with milliseconds, i.e. yyyy-MM-ddTHH:mm:ss.SSSZ. Note that the "Z" character indicates the GMT time zone.

Each time returned by Timestamp is expressed according to the ISO 8601 standard. For more information about this standard, refer to: https://en.wikipedia.org/wiki/ISO%5F8601

Note: This function is not suitable for timing purposes; you should use Milliseconds when you want to measure elapsed time.

Example

You can use Timestamp in a log file to know precisely when the events occurred. As shown below, you may have several operations occurring during the same second:

 $vhDocRef:=Append document("TimestampProject.log")
$logWithTimestamp:=Timestamp+Char(Tab)+"Log with timestamp"+Char(Carriage return)
SEND PACKET($vhDocRef;String($logWithTimestamp))

Result:

2016年12月12日T13:31:29.477Z  Log with timestamp
2016年12月12日T13:31:29.478Z Connection of user
12016-12-12T13:31:29.486Z ERROR - Exception of type 'System exception'
2016年12月12日T13:31:29.492Z Click on button1684
2016年12月12日T13:31:29.502Z [SP_HELP- 1 rows] Command processed
2016年12月12日T13:31:29.512Z [SP_HELP- 5 rows] Result set fetched

See also

Milliseconds
String
Time

Properties

Command number1445
Thread safeyes

AltStyle によって変換されたページ (->オリジナル) /