Tuesday, 29 November 2011

DISPLAY LONG AND SHORT DATES

There are lots of ways to display dates on your web pages. Here are two quick ways to do it with ASP / VBScript:


Printer Friendly Page


<% Response.Write FormatDateTime(Date, vbLongDate) %>




This script displays the date like this: 30 November 2011

You can also use the vbShortDate method like this:


Printer Friendly Page


<% Response.Write FormatDateTime(Date, vbShortDate) %>




This script displays the date like this: 30/11/2011

http://www.aspwebpro.com/aspscripts/dates/longshort.asp

No comments:

Post a Comment