Connecting Tech Pros Worldwide Help | Site Map

Need to set a start year in code: DateTime.Now.Year To DateTime.Now.Year + 10

Newbie
 
Join Date: Feb 2009
Posts: 2
#1: Feb 10 '09
With the following I get a drop down list of the current year and the next 10 years.

I need to set a start year eg 2008.. Can someone assist.

DateTime.Now.Year To DateTime.Now.Year + 10
Newbie
 
Join Date: Feb 2009
Posts: 2
#2: Feb 11 '09

re: Need to set a start year in code: DateTime.Now.Year To DateTime.Now.Year + 10


Add -1 after curent DateTime.Now.Year -1
jhardman's Avatar
Moderator
 
Join Date: Jan 2007
Location: logan, utah
Posts: 2,690
#3: Feb 11 '09

re: Need to set a start year in code: DateTime.Now.Year To DateTime.Now.Year + 10


Quote:

Originally Posted by hawkswins View Post

With the following I get a drop down list of the current year and the next 10 years.

I need to set a start year eg 2008.. Can someone assist.

DateTime.Now.Year To DateTime.Now.Year + 10

This doesn't look like vbscript. Can you please confirm that this was intended for the "classic" ASP forum? It kind of looks like you intended to go to the ASP.NET forum and posted here on accident.

Jared
Reply

Tags
.net, asp, asp.net