Login | |
|
 |
RE: Code for the exact age - 7/19/2007 11:40:02 PM
|
|
 |
|
| |
Country73
Posts: 710
Score: 8
Joined: 8/25/2004
From: USA
Status: offline
|
DateDiff(interval, date1, date2 [,firstdayofweek [, firstweekofyear]]) interval Required. String expression that is the interval you want to use to calculate the differences between date1 and date2.date1, date2 Required. Date expressions. Two dates you want to use in the calculation.firstdayofweek Optional. Constant that specifies the day of the week. If not specified, Sunday is assumed. See Settings section for values.firstweekofyear Optional. Constant that specifies the first week of the year. If not specified, the first week is assumed to be the week in which January 1 occurs. Your line: quote:
iYearDifference = DateDiff("yyyy", dtY2K, dtNow) You are using the year to find the YearDifference
|
|
| |
|
|
|
|
|