Date: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
JwellsNB (talk | contribs)
No edit summary
 
Line 5: Line 5:
Date returns the current system date.
Date returns the current system date.


== Example (Basic) ==
== Example ==


<pre>
<tabber>
Rem Date Example
JavaScript=
'Date returns current system date
<syntaxhighlight lang="JavaScript">
Dim Today
Today = Date
Print "Today is " & Today
</pre>
 
== Example (JavaScript) ==
<pre>
// Date Example
// Date Example
/* Date returns current system date */
/* Date returns current system date */
Line 25: Line 18:
var yyyy = dt.getYear()+1900;
var yyyy = dt.getYear()+1900;
var Today = mm + '/' + dd + '/' + yyyy;
var Today = mm + '/' + dd + '/' + yyyy;
NSB.Print(Today);
NSB.Print(Today);</syntaxhighlight>
</pre>
|-|
BASIC=
<syntaxhighlight lang="vb.net">
Rem Date Example
'Date returns current system date
Dim Today
Today = Date
Print "Today is " & Today
</syntaxhighlight>
</tabber>


== Output ==
== Output ==

Latest revision as of 17:49, 22 July 2019

Date

Description

Date returns the current system date.

Example

// 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

Output

Today is 8/18/1998
(sample date output is system dependant)

Related Items

Now, Time