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:  Tuesday, April 23rd, 2019

 

You can also use the vbShortDate method like this:

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

This script displays the date like this:  04/23/2019

< Back to ASP Scripts