Display Time

There are several ways to display times on your web pages.  Here are a few quick ways to do it with ASP and VBScript:

<% Response.Write FormatDateTime(Time, vbShortTime) %>

This displays the time like this:  5:20

 

<% Response.Write FormatDateTime(Time, vbLongTime) %> or

<% = Time %>

This will display the time with the Hour : Minute : Second and meridiem like this:  5:20:34 AM

 < Back to ASP Scripts