Display Year

There are a number of ways that you can display the current year on your web pages.  Here is a very simple way to do it with ASP and VBScript:

<% Response.Write Year(now) %>
OR
<% Response.Write DatePart("yyyy", Date()) %>

This script displays the current four digit year like this:  2018

 

<% Response.Write DatePart("yy", Date()) %>

This script displays the current year like this:  18

< Back to ASP Scripts