|
<< 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:
|
| 0 | MM-DD-YYYY |
| 1 | YYYY/MM/DD |
| 2 | DD/MM/YYYY |
| 3 | YYYY-MM-DD |
| 10 | MMDDYYYY |
| 11 | YYYYMMDD |
| 12 | DDMMYYYY |
| 31 | YYYYMM |
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