|
-
Oct 1st, 2001, 01:29 PM
#1
Thread Starter
Addicted Member
Add to a date
Can anybody tell me how to add to a date. I think the dates are actually stored as doubles but what i want to know is what a
second, minute, hour, day, month or year would be.
i have the following
Code:
Dim oldDate as Date
If Now() < oldDate + [what i want to add to the date] Then
DoEvents
End If
Hope you can help
-
Oct 1st, 2001, 01:33 PM
#2
PowerPoster
-
Oct 1st, 2001, 01:36 PM
#3
look up DateDiff and DateAdd in help.
-
Oct 1st, 2001, 01:37 PM
#4
PowerPoster
-
Oct 1st, 2001, 01:39 PM
#5
Thread Starter
Addicted Member
Cheers
I dont have the msdn so what goes in the Interval and Number parts. I presume the Date is the date you want to add the interval or number to?
Code:
Function DateAdd(Interval As String, Number As Double, Date)
-
Oct 1st, 2001, 01:49 PM
#6
PowerPoster
Interval is a code that determines what you want to add, e.g. Days, Months, Years etc. Number is how many Interval's you want to add to Date
The interval argument has these settings:
Setting Description
yyyy Year
q Quarter
m Month
y Day of year
d Day
w Weekday
ww Week
h Hour
n Minute
s Second
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|