How to ADD days to a DATE Variable?

Rexyss

Member
Joined
Jan 3, 2008
Messages
12
Programming Experience
Beginner
I have Dates in this format, stored i a database:
"01-07-2007 09:45:00"

I Read the date into a Variable:
Dim Date1 as Date
Date1 = "01-07-2007 09:45:00"

Now i need a way to tell,then i press Button1,
if NOW is more when 90 days after Date1
 
datediff + dateadd are legacy code. you can use .addDays

VB.NET:
Dim Date1 As Date
Date1 = "01-07-2007 09:45:00"
If Now > Date1.AddDays(90) Then
   MsgBox("Date1 is more than 90 days ago.")
End If
 
Back
Top