dateTimeString()

Synopsis

Returns the system date and time as a string when invoked. Can either return current local time or Coordinated Universal Time (UTC). The return value is always formatted as: YYYY-MM-DD HH:MM:SS.

Syntax

dateTimeString ( Optional localTime? As Boolean = True ) As String 
Argument Type Description
localTime? Boolean Optional; if True (the default), the function returns the time in the local system time zone. If False , it returns UTC time.

Example 1

No arguments, returns current local time:
Intent >dateTimeString() 
--> "2011-06-08 18:31:15" 

Example 2

Use UTC time:
Intent >dateTimeString(localTime? := False) 
--> "2011-06-08 23:31:15"