There are several different ways of displaying dates. You can also add and subtract from them as well. Using the FormatDateTime function we can display dates in any manner.
Thankfully this is an easy task with VBScript thanks to the DateAdd() function , lets take a look at some examples . In all cases we will take the date which is now and add / subtract from it.
I just love the Microsoft Calendar ActiveX Control. It's a great way to quickly add some really cool features to an application, but guess what, as usual it only works in IE! Yes I know you can get the ActiveX plug-in for Netscape to get ActiveX to run, but what percentage of your users have it? More importantly, if they don't have it are they gonna go get it and then come back to your site, or are they just going to go someplace else?
The DateDiff() function returns the value of intervals between two dates. You can use many timeintervals with it as explained in detail in the code below. You can use it in the following format.
A lot of people tend to put dates in drop down list boxes so that users have no way to format the date wrong. There is nothing wrong with that approach though it is not really needed as valaditing dates is very simple using the IsDate() function
this example takes a given date and then works out whether a user is under a certain age , in this case 16 years and then prints a message on the screen depending on whether this is true or false . You could redirect users to different pages instead