Time Difference in VB6

Discussion in 'Visual Basic ( VB )' started by jodarox, Nov 1, 2007.

  1. jodarox

    jodarox New Member

    Joined:
    Nov 1, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    Hi everyone! I am just a new registrant to this site and maybe I have more fun to this I have a question about calculating times between times in VB6 is there anyone knows the code? :D
     
  2. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    Code:
    'To find Days
    DateTime.DateDiff("d",Text1.Text,now)
    
    'To find Months
    DateTime.DateDiff("m",Text1.Text,now)
    
    'To find Years
    DateTime.DateDiff("y",Text1.Text,now)
    
    'To find Hours
    DateTime.DateDiff("h",Text1.Text,now)
    
    'To find Minutes
    DateTime.DateDiff("n",Text1.Text,now)
    
    'To find Seconds
    DateTime.DateDiff("s",Text1.Text,now)
    
     
  3. jodarox

    jodarox New Member

    Joined:
    Nov 1, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    Thanks for replying me so soon I'm very glad about that. the problem for that code is in seconds its accumulated and not restting into 60 seconds only is ther any other way in calcutlating time difference? Thank in advance I appreciated most your soonest response.
    Regards to all! ;)
     
  4. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice