<% Response.Write FormatDateTime(Time, vbShortTime) %>
This displays the time like this: 07:49
<% Response.Write FormatDateTime(Time, vbLongTime) %> or
<% = Time %>
These both display the time like this: 07:49:02
You could also these methods to display a portion of the time:
<%= Hour(Now) %> : <%= Minute(Now) %> : <%= Second(Now) %>
This displays the time like this: 7 : 49 : 2
http://www.aspwebpro.com/aspscripts/dates/times.asp
No comments:
Post a Comment