Month: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
MONTH(''date)
Month(''date)


'''Description'''
== Description ==


MONTH returns a whole number ranging from 1 to 12 that represents the month of the year, of a given date.The required parameter, ''date'', can be any numeric or string expression, or any expression that represents a date.
Month returns a whole number ranging from 1 to 12 that represents the month of the year, of a given date.The required parameter, ''date'', can be any numeric or string expression, or any expression that represents a date.


'''Example'''
== Example ==


<pre>
<pre>
REM MONTH Example
Rem Month Example
'MONTH returns month of year of a date
'Month returns month of year of a date
DIM When
Dim When
When = NOW
When = Now
PRINT "The MONTH of " & When & " is " _  
Print "The Month of " & When & " is " _  
       & MONTH(When)
       & Month(When)
</pre>
</pre>


'''Output'''
== Output ==


<pre>
<pre>
The MONTH of 8/18/1998 10:52:44 PM is 8
The Month of 8/18/1998 10:52:44 PM is 8
(sample date output is system dependant)
(sample date output is system dependant)
</pre>
</pre>


'''Related Items'''
== Related Items ==


[[day|DAY]], [[hour|HOUR]], [[minute|MINUTE]], [[now|NOW]], [[second|SECOND]], [[time|TIME]], [[year|YEAR]]
[[day|DAY]], [[hour|HOUR]], [[minute|MINUTE]], [[now|NOW]], [[second|SECOND]], [[time|TIME]], [[year|YEAR]]
[[Category:Language Reference]]

Revision as of 02:17, 17 August 2012

Month(date)

Description

Month returns a whole number ranging from 1 to 12 that represents the month of the year, of a given date.The required parameter, date, can be any numeric or string expression, or any expression that represents a date.

Example

Rem Month Example
'Month returns month of year of a date
Dim When
When = Now
Print "The Month of " & When & " is " _ 
       & Month(When)

Output

The Month of 8/18/1998 10:52:44 PM is 8
(sample date output is system dependant)

Related Items

DAY, HOUR, MINUTE, NOW, SECOND, TIME, YEAR