// Date Example
/* Date returns current system date */
var dt = new Date();
var dd = dt.getDate();
var mm = dt.getMonth()+1;
var yyyy = dt.getYear()+1900;
var Today = mm + '/' + dd + '/' + yyyy;
NSB.Print(Today);
No edit summary |
No edit summary |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
== Example == | == Example == | ||
< | <tabber> | ||
JavaScript= | |||
<syntaxhighlight lang="JavaScript"> | |||
// Date Example | |||
/* Date returns current system date */ | |||
var dt = new Date(); | |||
var dd = dt.getDate(); | |||
var mm = dt.getMonth()+1; | |||
var yyyy = dt.getYear()+1900; | |||
var Today = mm + '/' + dd + '/' + yyyy; | |||
NSB.Print(Today);</syntaxhighlight> | |||
|-| | |||
BASIC= | |||
<syntaxhighlight lang="vb.net"> | |||
Rem Date Example | Rem Date Example | ||
'Date returns current system date | 'Date returns current system date | ||
Line 13: | Line 27: | ||
Today = Date | Today = Date | ||
Print "Today is " & Today | Print "Today is " & Today | ||
</ | </syntaxhighlight> | ||
</tabber> | |||
== Output == | == Output == | ||
Line 27: | Line 42: | ||
[[Category:Language Reference]] | [[Category:Language Reference]] | ||
[[Category:Date and Time]] |
Date
Date returns the current system date.
// Date Example
/* Date returns current system date */
var dt = new Date();
var dd = dt.getDate();
var mm = dt.getMonth()+1;
var yyyy = dt.getYear()+1900;
var Today = mm + '/' + dd + '/' + yyyy;
NSB.Print(Today);
Rem Date Example
'Date returns current system date
Dim Today
Today = Date
Print "Today is " & Today
Today is 8/18/1998 (sample date output is system dependant)