<cDateTime>.DateString

<< Click to Display Table of Contents >>

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

<cDateTime>.DateString

 

Description

 

Returns date component of cDateTime object as text respecting system locale.

 

Syntax

 

<cDateTime>.DateString[(lFormat)]

 

Returns

 

String in format respecting system locale; using numbers for days, months and years.

 

Parameters

 

Name

Type

Optional

Meaning

lFormat

Number

Yes

By default (without any lFormat specification) returned date will have the system locale format.

 

Possible other formatting types:

0MM-DD-YYYY
1YYYY/MM/DD
2DD/MM/YYYY
3YYYY-MM-DD

 

10MMDDYYYY
11YYYYMMDD
12DDMMYYYY

 

31YYYYMM

 

 

0MM-DD-YYYY
1YYYY/MM/DD
2DD/MM/YYYY
3YYYY-MM-DD

 

10MMDDYYYY
11YYYYMMDD
12DDMMYYYY

 

31YYYYMM

 

Remarks

 

Restrictions

 

See also

 

Examples

 

' Create an object with current date and time

Dim myDateTime As New cDateTime

 

' Display date part of myDateTime as DD.MM.YYYY string

MsgBox 0, "myDateTime date:" + $CRLF + myDateTime.dateString