<% Response.Write DatePart("m", Date()) %>
This script displays the current month number like this: 11
<% Response.Write DatePart("d", Date()) %>
This script displays the current date for the month like this: 30
<% Response.Write DatePart("yyyy", Date()) %>
This script displays the current year like this: 2011
<% Response.Write DatePart("ww", Date()) %>
This script displays the current week of the year like this: 49
<% Response.Write DatePart("q", Date()) %>
This script displays the current quarter of the year like this: 4
http://www.aspwebpro.com/aspscripts/dates/selectpartofdate.asp
No comments:
Post a Comment