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:  10:14

 

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

<% = Time %>

This will display the time with the Hour : Minute : Second and meridiem like this:  10:14:20 PM

 < Back to ASP Scripts