http://www.chrispearson.org/pages/programming/vbscript/datework/dates.asp
09h33
Wednesday, 8. October 2008

 |
 |
|
|
| Working
with dates
At
its most basic there's nothing like having the date and time
on a web page to make it seem freshly served - Even if it
would be just as freshly-served without such an embellishment.
But
there are more serious requirements for date and time manipulation
in active server pages (ASP) and VBScript isn't always at
its most straightforward when you're dealing with date-time
entities.
An
active server page that returns a calendar for a given month
provides a suitable model project to investigate VBScript's
date abilities and how to weave them into HTML for the browser.
Once
you get to grips with the date side of date-time the time
comes fairly easily. |
|
 |
|
Introduction
Although
date-time representations and manipulation is core to all
kinds of web processing there is a definite - though probably
undeserved - mystique about it all.
Learning
about the date functions by using them is probably the most
effective way of becoming comfortable with using them. |
|
 |
Basic
calendar page
A
basic calendar page can be used to demonstrate the coding
techniques used in a more complex date project, a web-based
movements sheet, maybe. The concepts are explored initially
in ASPcalendar.asp.
This
concept page is developed further in the
active server page which renders a calendar, initiated by
a HTML page which
passes month and year parameters.
The
code for the HTML/ASP page pair is analysed in calendar
code. Also, from that page, there is a download of the
HTML and ASP files for the project's pages. |
Some
VBScript date functions and constants are covered in the examples
presented in the pages weekday
and days in a month (or
go straight to the easy
way to return days in a month and miss
the discussion!) |
| |
|
| |
|
|
|
|
Background
The
important background detail is covered in Background
on date processing and there are onward links from there to
more detailed discussions of date and time functions
|
|
|
copyright ©2000
-
2008 Chris Pearson