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:  Wednesday, October 4th, 2023

 

You can also use the vbShortDate method like this:

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

This script displays the date like this:  10/04/2023

< Back to ASP Scripts