Results 1 to 2 of 2

Thread: Computing Date

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Pilipinas
    Posts
    441

    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.

  2. #2
    Addicted Member
    Join Date
    Oct 2002
    Posts
    145
    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
  •  



Click Here to Expand Forum to Full Width