| Topic: ASP Displaying the current date and Time The date and time described in this section are those that are on the server. <%= Now() %> prints out 11/08/2006 21:18:09 <%= Time() %> prints out 21:18:09 <%= FormatDateTime(strNow, vbGeneralDate) %> prints out 11/08/2006 <%= FormatDateTime(strNow, vbLongDate) %> prints out 11 August 2006 <%= FormatDateTime(strNow,vbShortDate) %> prints out 11/08/2006 <%= FormatDateTime(strNow, vbLongTime) %> prints out 21:18:09 <%= FormatDateTime(strNow, vbShortTime) %> prints out 21:18 <%= Year(strNow) %> prints out 2006 <%= Month(strNow) %> prints out 8 <%=Day(strNow) %> prints out 11 <%=Hour(strNow) %> prints out 21 <%=Minute(strNow) %> prints out 18 <%=Second(strNow) %> prints out 9 <%= WeekDay(strNow) %> prints out 6 <%= WeekDayName(WeekDay(strNow)) %> prints out Friday <%= WeekDayName(WeekDay(strNow), 1) %> prints out Fri |
|
|
|