ASP Tutorial Lesson 4: Dates and Times

Dates and times are important data formats for your pages. Just think of how often they are used in real world contexts. This lesson shows you how they are implemented in Classic ASP.

Here is a list of the main date and time format functions.

now returns 12/10/2001 17:10:33

date() returns 12/10/2001

time() returns 17:10:33

formatDateTime(now,vbLongDate) returns 12 October 2001

formatDateTime(now,vbShortDate) returns 12/10/2001

day(now) returns 12

weekday(now) returns 6

weekdayname(weekday(now)) returns Friday

month(now) returns 10

monthname(month(now)) returns October

year(now) returns 2001

If you want to get really complex then check out the 4guys site.