WeekdayName: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Brendon (talk | contribs)
No edit summary
Brendon (talk | contribs)
No edit summary
Line 1: Line 1:
WeekDayName''number''[, ''abbreviate''[, ''firstdayofweek'']])
WeekdayName''number''[, ''abbreviate''[, ''firstdayofweek'']])


== Description ==
== Description ==


WeekDayName returns a string representing the day of week. The required argument, ''number'', is an integer ranging from 1 to 7 that represents the number of the day of the week. The optional argument, ''abbreviate'', is a boolean expression, if ''abbreviate'' is TRUE the value returned is the three-letter abbreviation of the weekday name, otherwise the full name is returned by default. The optional parameter ''firstdayofweek'' is Sunday, if not specified.
WeekdayName returns a string representing the day of week. The required argument, ''number'', is an integer ranging from 1 to 7 that represents the number of the day of the week. The optional argument, ''abbreviate'', is a boolean expression, if ''abbreviate'' is TRUE the value returned is the three-letter abbreviation of the weekday name, otherwise the full name is returned by default. The optional parameter ''firstdayofweek'' is Sunday, if not specified.


== Example ==
== Example ==


<pre>
<pre>
Rem WeekDayName Example
Rem WeekdayName Example
'WeekDayName returns string name of day
'WeekdayName returns string name of day
Dim Day1, Day2
Dim Day1, Day2
Day1 = 1
Day1 = 1
Print WeekDayName(Day1)
Print WeekdayName(Day1)
Day2 = 2
Day2 = 2
Print WeekDayName(Day2, TRUE, vbMonday)
Print WeekdayName(Day2, TRUE, vbMonday)
</pre>
</pre>



Revision as of 01:20, 24 August 2012

WeekdayNamenumber[, abbreviate[, firstdayofweek]])

Description

WeekdayName returns a string representing the day of week. The required argument, number, is an integer ranging from 1 to 7 that represents the number of the day of the week. The optional argument, abbreviate, is a boolean expression, if abbreviate is TRUE the value returned is the three-letter abbreviation of the weekday name, otherwise the full name is returned by default. The optional parameter firstdayofweek is Sunday, if not specified.

Example

Rem WeekdayName Example
'WeekdayName returns string name of day
Dim Day1, Day2
Day1 = 1
Print WeekdayName(Day1)
Day2 = 2
Print WeekdayName(Day2, TRUE, vbMonday)

Output

Sunday
Tue