Day: Difference between revisions
Jump to navigation
Jump to search
Add javascript snippet |
|||
Line 5: | Line 5: | ||
Day returns an integer, ranging from 1 to 31, that represents the day of the month, from a given date. The required parameter, ''date'', can be any expression that represents a date. | Day returns an integer, ranging from 1 to 31, that represents the day of the month, from a given date. The required parameter, ''date'', can be any expression that represents a date. | ||
== Example == | == Example (Basic) == | ||
<pre> | <pre> | ||
Line 16: | Line 16: | ||
Print "90 days from now it will be " _ | Print "90 days from now it will be " _ | ||
& Day(NextQuarter) | & Day(NextQuarter) | ||
</pre> | |||
== Example (JavaScript) == | |||
<pre> | |||
// Day Example | |||
/* Day returns number representing dayof month */ | |||
var Today, NextQuarter; | |||
Today = new Date(); | |||
NextQuarter = new Date(); | |||
NextQuarter.setDate(NextQuarter.getDate()+90); | |||
NSB.Print("Today's day is " + Today.getDate()); | |||
NSB.Print("90 days from now it will be " + NextQuarter.getDate()); | |||
</pre> | </pre> | ||
Revision as of 18:08, 27 May 2013
Day(date)
Description
Day returns an integer, ranging from 1 to 31, that represents the day of the month, from a given date. The required parameter, date, can be any expression that represents a date.
Example (Basic)
Rem Day Example 'Day returns number representing dayof month Dim Today, NextQuarter Today = Date NextQuarter = Today + 90 Print "Today's day is " & Day(Today) Print "90 days from now it will be " _ & Day(NextQuarter)
Example (JavaScript)
// Day Example /* Day returns number representing dayof month */ var Today, NextQuarter; Today = new Date(); NextQuarter = new Date(); NextQuarter.setDate(NextQuarter.getDate()+90); NSB.Print("Today's day is " + Today.getDate()); NSB.Print("90 days from now it will be " + NextQuarter.getDate());
Output
Today's day is 18 90 days from now it will be 16