Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

VBScript WeekdayName function


May 13, 2021 VBScript


Table of contents


VBScript WeekdayName function

The VBScript WeekdayName function is used to return a string that represents the day of the week.


VBScript WeekdayName function Complete VBScript reference manual

The WeekdayName function returns the name of the week for the day specified in the week.

Grammar

WeekdayName(weekday[,abbreviate[,firstdayofweek]])

Parameters

parameter describe
weekday Required.The number of the first few days of the week.
abbreviate Optional.Boolean value indicates whether abbreviated weeks.
firstdayofweek Optional.The first day of the week.

The following value can be used:

  • 0 = VbusesystemDayofweek - Using Regional Language Support (NLS) API Settings
  • 1 = VBSunday - Sunday (default)
  • 2 = VBMONDAY - Monday
  • 3 = VBTESDAY - Tuesday
  • 4 = vbwednesday - Wednesday
  • 5 = VBTHURSDAY - Thursday
  • 6 = VBFRIDAY - Friday
  • 7 = VBSATURDAY - Saturday

Instance 1

Get the name of day 3 of the week:

<script type="text/vbscript">

document.write(WeekdayName(3))

</script>

The above example output results:

Tuesday

Try it out . . .

Example 2

Get a shorthand for day 3 of the week:

<script type="text/vbscript">

document.write(WeekdayName(3,True))

</script>

The above example output results:

Tue

Try it out . . .

Example 3

Get the name of day 3 of the week, the first day of the week is Monday:

<script type="text/vbscript">

document.write(WeekdayName(3,False,2))

</script>

The above example output results:

Wednesday

Try it out . . .


VBScript WeekdayName function Complete VBScript reference manual