Display Long and Short Dates

There are lots of ways to display dates on your web pages. Here are two quick ways to do it with ASP and VBScript.

<p><% Response.Write FormatDateTime(Date, vbLongDate) %></p>

This script displays the date like this:  Monday, October 21st, 2019

 

You can also use the vbShortDate method like this:

<p><% Response.Write FormatDateTime(Date, vbShortDate) %></p>

This script displays the date like this:  10/21/2019

< Back to ASP Scripts