Results 1 to 5 of 5

Thread: DateTime problem (resolved)

Threaded View

  1. #1

    Thread Starter
    PowerPoster SuperSparks's Avatar
    Join Date
    May 2003
    Location
    London, England
    Posts
    265

    DateTime problem (resolved)

    I just can't seem to get my head round this one:

    VB Code:
    1. Private Sub btnAlmStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAlmStart.Click
    2.  
    3.         Time1 = Now                             ' Take initial time value to add HH, MM, SS to
    4.         Hours = CInt(cmbHours.Text)             ' Assign to global variables values from combo boxes
    5.         Minutes = CInt(cmbMins.Text)
    6.         Seconds = CInt(cmbSecs.Text)
    7.         Dim TS As New TimeSpan(Hours, Minutes, Seconds)     ' Create new TimeSpan value and set it
    8.         Time1.Add(TS)                                       ' Add it to the initial time to give end time

    A couple of lines of debugging coide have shown that Time1 never gets the value of TS added to it. If anyone could point out where I'm going wrong I'd be most grateful.
    Last edited by SuperSparks; Feb 23rd, 2004 at 12:08 PM.
    Nick.

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