Programming Reference Manual
DateAdd
Syntax
DateAdd(
interval
,
number
,
dateexpr
)
Description
Return a
date
value a number of intervals from another date.
Parameter
Description
interval
This string value indicates which kind of interval to add.
number
Add this many intervals. Use a negative value to get an earlier date.
dateexpr
Calculate the new date relative to this date value. If this value is
Null
then
Null
is returned.
Interval
Description
yyyy
Year
q
Quarter
m
Month
y
Day of year
d
Day
w
Weekday
ww
Week
h
Hour
n
Minute
s
Second
See Also
DateDiff
,
DatePart
.
Example
Sub
Main
Debug
.
Print
DateAdd
(
"yyyy"
,1,#1/1/2000#)
'1/1/2001
End
Sub
Home
IDE Overview
Declarations
Data Types
Assignment
Flow Control
Error Handling
Conversion
Variable Info
Constant
Math
Financial
Strings
StringClass
Objects
Time/Date
Time/Date
Date
DateAdd
DateDiff
DatePart
DateSerial
DateValue
Day
EasterDate
Hour
Minute
Month
MonthName
Now
Second
Time
Timer
TimeSerial
TimeValue
Weekday
WeekdayName
WeekNum
Year
File
User Input
User Dialog
Dialog Functions
Web Form
CCL (web server)
DDE
Settings
Miscellaneous
Operator
Translator