Results 1 to 4 of 4

Thread: Time difference

  1. #1
    Join Date
    Feb 2004
    Posts
    6

    Unanswered: Time difference

    Hi,
    how do i calculate difference between times in vb?

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    If you are talking VB6 or earlier, subtract the smaller (start) time from the larger (end) time to get the difference (elapsed).

    -PatP

  3. #3
    Join Date
    Feb 2004
    Posts
    6
    Originally posted by Pat Phelan
    If you are talking VB6 or earlier, subtract the smaller (start) time from the larger (end) time to get the difference (elapsed).

    -PatP
    Could we use any inbuilt function like DateDiff to calculate time difference in VB6?

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I don't know of any VB 6.0 function that is analagous to DateDiff() in MS-SQL. If youi look at how date/time values are stored in MSDN, you can see that simple subtraction works nicely.

    -PatP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •