From http://www.w3schools.com (Copyright Refsnes Data)
Complete VBScript Reference
The DatePart function returns the specified part of a given date.
| DatePart(interval,date[,firstdayofweek[,firstweekofyear]]) |
| Parameter | Description |
|---|---|
| interval | Required. The interval of time to return. Can take the following values:
|
| date | Required. Date expression to evaluate |
| firstdayofweek | Optional. Specifies the day of the week. Can take the following values:
|
| firstweekofyear | Optional. Specifies the first week of the year. Can take the following values:
|
|
document.write(Date & "<br />") document.write(DatePart("d",Date)) Output: 1/14/2002 14 |
|
document.write(Date & "<br />") document.write(DatePart("w",Date)) Output: 1/14/2002 2 |
Complete VBScript Reference
From http://www.w3schools.com (Copyright Refsnes Data)