|
-
Jan 13th, 2003, 09:17 PM
#1
Thread Starter
Hyperactive Member
Computing Date
How can I compute the date in VB.NET?
Like for example I have TextBox1 and TextBox2.
The value of TextBox1 is 01/08/03 and the value of TextBox2 is 4.
I am getting the due date result of 01/12/03 so I tried this code;
Dim DueDate As Integer
DueDate = DateValue(TextBox1.Text) + Val(TextBox2.Text)
MessageBox.Show(DueDate)
But it doesn't work. Kindly show me how to compute date.
-
Jan 13th, 2003, 10:24 PM
#2
Addicted Member
Try:
DueDate = DateAdd(DateInterval.Day, 4, Textbox1.text)
Marivic
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
|