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, December 12th, 2018

 

You can also use the vbShortDate method like this:

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

This script displays the date like this:  12/12/2018

< Back to ASP Scripts