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:  8:30

 

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

<% = Time %>

This will display the time with the Hour : Minute : Second and meridiem like this:  8:30:26 AM

 < Back to ASP Scripts