WeekDayName Function

Tips >>ASP Functions

WANTS TO MAKE SOFTWARE WITHOUT KNOWLEDGE OF ASP? CLICK HERE


The WeekdayName function returns the weekday name of a specified day of the week. Returns a string indicating the specified day of the week. The WeekdayName function returns the full spelling of the name of the day of the week.

The Syntax of the WeekDayName function is :-

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

Its Description is :-

Parameter Description
weekdayc Required. The number of the weekday
abbreviate Optional. A Boolean value that indicates if the weekday name is to be abbreviated
firstdayofweek

Optional. Specifies the first day of the week.
Can take the following values:·

  • 0 = vbUseSystemDayOfWeek - Use National Language Support (NLS) API setting.
  • 1 = vbSunday - Sunday (default).
  • 2 = vbMonday - Monday.
  • 3 = vbTuesday-Tuesday.
  • 4 = vbWednesday - Wednesday.
  • · 5 = vbThursday - Thursday.
  • · 6 = vbFriday - Friday.
  • · 7 = vbSaturday - Saturday.

Example#1 :-

Code :-
document.write(WeekdayName(3))
Output :-
Tuesday

Example#2 :-

Code :-
document.write(Date & "<br />")
document.write(Weekday(Date) & "<br />")
document.write(WeekdayName(Weekday(Date)))
Output :-
1/15/2002
3
Tuesday

Example#3 :-

Code :-
Dim MyDateMyDate = WeekDayName(6, True)
Output :-#F0F0F0
MyDate contains Friday
Hence, WeekDayName Contains Friday.

There is One Mandatory Argument.

Example#4 :-
It explains Weekday Argument

Code :-
<%
=WeekdayName(7)
%>
Output :-
Saturday

There are Two Optional Arguments.

Example#5 :-
It explains Abbreviate Argument

Code :-
<%
=WeekdayName(7, True)
%>
Output :-
Saturday

Example#6 :-
It explains FirstDayofWeek Argument

Code :-
<%
=WeekdayName(6, False, 2)
%>
Output :-
Saturday

Example#7 :-

Code :-
<%
=WeekdayName(6, False, VBMonday)
%>
Output :-
Saturday

 
E-mail : sales@virtualsplat.com
Phone : +91-9892413501

Whatsapp Icon +91-9967648641

Whatsapp Icon +91-9967648641