Returns the day of the week corresponding to day_of_week, an integer in the range 1 (Sunday) to 7 (Saturday).
DayOfWeekAsString(day_of_week)
Day,
DayOfWeek,
DayOfYear,
DaysInMonth,
DaysInYear,
FirstDayOfMonth
Parameter |
Description |
---|---|
day_of_week |
Integer that represents the day of the week, where 1 is Sunday, 2 is Monday, and so on |
Year values 0 - 29 are interpreted as 21st century dates. Year values 30 - 99 are interpreted as 20th century dates.
<!--- shows the value of the dayOfWeekAsString function ---> <html> <head> <title>DayOfWeekAsString Example</title> </head> <body bgcolor = silver> <H3>DayOfWeekAsString Example</H3> <cfif IsDefined("FORM.year")> More information about your date: <cfset yourDate = CreateDate(FORM.year, FORM.month, FORM.day)> <cfoutput> <P>Your date, #DateFormat(yourDate)#. <BR>It is #DayofWeekAsString(DayOfWeek(yourDate))#, day #DayOfWeek(yourDate)# in the week. <BR>This is day #Day(YourDate)# in the month of #MonthAsString(Month(yourDate))#, which has #DaysInMonth(yourDate)# days. <BR>We are in week #Week(yourDate)# of #Year(YourDate)# (day #DayofYear(yourDate)# of #DaysinYear(yourDate)#). <BR><cfif IsLeapYear(Year(yourDate))>This is a leap year <cfelse>This is not a leap year</cfif> </cfoutput>