<cDateTime>.InitNow

<< Click to Display Table of Contents >>

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

<cDateTime>.InitNow

 

Description

 

Sets the cDateTime variable to current local date and time.

 

Syntax

 

s = <cDateTime>.InitNow

 

Returns

 

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

 

Remarks

 

Equal to <cDateTime>.Now 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.InitNow

 

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