|
<< Click to Display Table of Contents >> Navigation: ThinBASIC Core Language > BuiltIn Functions > Date and Time > cDateTime > cDateTime_Methods > <cDateTime>.NowUTC |
Description
Sets the cDateTime variable to current UTC date and time.
Syntax
s = <cDateTime>.NowUTC
Returns
String in the following <cDateTime>.ToStringFormat("yyyy-MM-dd HH:mm:ss.fff")
Remarks
Restrictions
See also
Examples
' Create an object with current date and time
Dim myDateTime As New cDateTime
' Original form
MsgBox 0, "Your current local time is:" + $CRLF + myDateTime.toString
' Updates myDateTime time with current UTC date and time
myDateTime.NowUTC
' Modified form
MsgBox 0, "Current UTC time is:" + $CRLF + myDateTime.toString