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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hawkswins
    New Member
    • Feb 2009
    • 2

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

    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.Ye ar To DateTime.Now.Ye ar + 10
  • hawkswins
    New Member
    • Feb 2009
    • 2

    #2
    Answer to previous year in dropdown list

    Add -1 after curent DateTime.Now.Ye ar -1

    Comment

    • jhardman
      Recognized Expert Specialist
      • Jan 2007
      • 3405

      #3
      Originally posted by hawkswins
      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.Ye ar To DateTime.Now.Ye ar + 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

      Comment

      Working...