<% Response.Write DatePart("w", Date()) %>
This script displays the current month number like this: 4
If you want to display the name of a month, you can use this code:
<% DIM iDay iDay = DatePart("w", Date()) SELECT CASE iDay Case "1" strDayName = "Sunday" Case "2" strDayName = "Monday" Case "3" strDayName = "Tuesday" Case "4" strDayName = "Wednesday" Case "5" strDayName = "Thursday" Case "6" strDayName = "Friday" Case "7" strDayName = "Saturday" END SELECT Response.Write strDayName %>
This script displays the month name like this: Wednesday
http://www.aspwebpro.com/aspscripts/dates/dayofweek.asp
No comments:
Post a Comment