Day: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(5 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
''This function is for BASIC compatibility. It is not available in pure JavaScript projects.'' | |||
Day(''date'') | Day(''date'') | ||
Line 5: | Line 7: | ||
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> | ||
Rem Day Example | |||
'Day returns number representing dayof month | 'Day returns number representing dayof month | ||
Dim Today, NextQuarter | |||
Today = | Today = Date | ||
NextQuarter = Today + 90 | NextQuarter = Today + 90 | ||
Print "Today's day is " & Day(Today) | |||
Print "90 days from now it will be " _ | |||
& | & Day(NextQuarter) | ||
</pre> | </pre> | ||
Line 27: | Line 29: | ||
== Related Items == | == Related Items == | ||
[[hour| | [[hour|Hour]], [[minute|Minute]], [[month|Month]], [[now|Now]], [[second|Second]], [[weekday|WeekDay]], [[year|Year]] | ||
[[Category:Language Reference]] | [[Category:Language Reference]] | ||
[[Category:Date and Time]] | |||
[[Category:BASIC Functions]] |
Latest revision as of 15:22, 25 March 2019
This function is for BASIC compatibility. It is not available in pure JavaScript projects.
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)
Output
Today's day is 18 90 days from now it will be 16