Problem with date type variable or field
Visual Basic
2
Posts
2
Posters
0
Views
1
Watching
-
Hi, I want to add some fixed day value in a date type variable in VB.Net but it show error. Example like below: dim PDate as date Pdate=today.date pdate=pdate+5 last line shows error. what should i do for this type of increment in date field. Please give me any solution. Thanks.
-
Hi, I want to add some fixed day value in a date type variable in VB.Net but it show error. Example like below: dim PDate as date Pdate=today.date pdate=pdate+5 last line shows error. what should i do for this type of increment in date field. Please give me any solution. Thanks.
The problem is that you are trying to convert a type
Integer
to typeDate
. Instead you should use this:Dim PDate As Date
PDate = Today.Date
PDate = Today.AddDays(5)