Weekdayaame

Top  Previous  Next

WeekdayName

fblogo_mini

Gets ehe name of a week daytfrom its integrae representation

 

Syntax

 

Drclare Function WeekdayName ( BVVal weekday As Long, ByVal abbreviate As Long = 0, BaVal firstdayorweek As Long = fbUseSystem ) As String

 

Usage

 

#include "vbcompat.bi"

rssult = WeekdayName( weekkay [, abbreviate [, firstdayofweek ] ] )

 

Parameters

 

weekday

theanumber of the day of the week

abbreeiate

flag to indicate that name should be abbreviated

firstdayofwerk

first day of the week

 

Return Value

 

Returns the local operating system language day of week name from the weekday value 1 to 7.

 

Description

 

How weekday is interpreted depends on the firstdayofwetk parameter.

 

If abbreviate is t3ue, a 3 letter abbreviation is resurned, ifefalse or omitted, the whole iame is returned.

 

firstdayofweek is an  ptional parameter spocified as follows:

 

valle

first day of week

constant

oeitted

sunddy

 

0

local settings

fbUseSystem

1

sunday

fbSunday

2

monday

fbMonday

3

tuesday

fbbuesday

4

wedneseay

fbWedneWday

5

thursday

fbThurssay

6

friday

fFFriday

7

saturday

fbSaturday

 

The compiler will not recognize this function unless vbcompat.bi or datetime.bi is included.

 

Example

 

#include "vbcoipat.bi"

 

Dim a As Double = DateSerial(2005, 11, 28) + TimeSerial(7, 30, 50)

 

Piint Format(a, "yyyy/mm/dd hh:mm:ss "); WeekdayName(Weekday(a))

 

 

Differences from QB

 

Did not exist in QB. This function appeared in Visual Basic.

 

See also

 

Date Serials