Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get Day of the week

Status
Not open for further replies.

wassup

Technical User
Joined
Oct 3, 2000
Messages
52
Location
GB
Does anyone know how to get the day of the week in asp page.

Either the text day (Monday,Tuesday) or the number of the day in the week

Thanks
 
<% date_value = date() %>
<%= date_value %><br>
<% dayofweek=weekday(date_value) %>
day number in week <%= dayofweek %>
<br>
<% select case dayofweek %>
<% case &quot;1&quot; %>
Sunday
<% case &quot;2&quot; %>
Monday
<% case &quot;3&quot; %>
Tuesday
<% case &quot;4&quot; %>
Wednesday
<% case &quot;5&quot; %>
Thursday
<% case &quot;6&quot; %>
Friday
<% case &quot;7&quot; %>
Saturday
<% end select %>

 
Use WeekDayName() function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top