Excel vba 里的日期加减函数是? - ExcelVBA程序开发 - Excel H...
电视新闻节目-送礼
Excel vba 里的日期加减函数是? - ExcelVBA程序开发 -
Excel H...
Returns a Variant
(Long) specifying the number of time
intervals
between two specified dates.
Syntax
DateDiff(interval, date1, date2[,
firstdayofweek[,
firstweekofyear]])
The
DateDiff function syntax has these named
arguments:Part
Description
interval
Required. String expression that
is the interval of time you use
to calculate
the difference between date1 and date2.
date1, date2
Required; Variant (Date). Two
dates you want to use in the
calculation.
firstdayofweek
Optional. A
constant that specifies the first day of the week.
If
not specified, Sunday is assumed.
firstweekofyear
Optional. A 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.