CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Time Diff

  1. #1
    Guest

    Time Diff

    Please can someone tell me how to calculate the difference between two times stored in a recordset.
    I do not need to calculate the difference in days or dates, i just need the difference in time.


  2. #2
    Join Date
    Oct 1999
    Posts
    63

    Re: Time Diff

    Do you want the difference in Hours/Minutes/Seconds?


  3. #3
    Join Date
    Oct 1999
    Posts
    63

    Re: Time Diff

    Use datediff function to find out the time difference

    For Example:

    'Difference in hours
    diff = DateDiff("h", date1, date2)

    'Difference in minutes
    diff = DateDiff("n", date1, date2)

    'Difference in Seconds
    diff = DateDiff("s", date1, date2)


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

Featured