<cDateTime>.InitUTC

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Core Language > BuiltIn Functions > Date and Time > cDateTime > cDateTime_Methods >

<cDateTime>.InitUTC

 

Description

 

Sets the cDateTime variable to current UTC date and time.

 

Syntax

 

s = <cDateTime>.InitUTC

 

Returns

 

String in the following <cDateTime>.ToStringFormat("yyyy-MM-dd HH:mm:ss.fff")

 

Remarks

 

Equal to <cDateTime>.NowUTC but more expressive

 

Restrictions

 

See also

 

Examples

 

' Create an object with current date and time

Dim myDateTime As New cDateTime

 

' Updates myDateTime time with current date and time

myDateTime.InitUTC

 

MsgBox 0, "Current UTC time is:" + $CRLF + myDateTime.toString