time computation in vb

Discussion in 'Visual Basic ( VB )' started by sheng, Nov 18, 2008.

  1. sheng

    sheng New Member

    Joined:
    Aug 27, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    have you tried to compute the time (hours,minutes,seconds) in visual basic 6.0???
    kindly share your ideas...thanks....
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    Compute the time from what? Are you converting something to H,M,S, or are you counting time? If the latter it's just a case of incrementing three variables and wrapping round to zero when each reaches an appropriate value.
     
  3. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Please post the complete context.
     
  4. sheng

    sheng New Member

    Joined:
    Aug 27, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    My objective is to make a log in/log-out system that will compute the total number of hours of an employee…I used vb 6.0 as my front-end to ms sql 2000 as the back-end. The time will be saved on the database and the corresponding date (e.g. 2008-11-25 10:00:00 AM) since the time and date cannot be recorded in separate manner because of the data type datetime of the ms sql. My problem is how to compute and retrieve the time alone from the database and the date will be not included? Kindly share your ideas please. Thanks in advance.:pleased:
     
  5. Cseek

    Cseek New Member

    Joined:
    Dec 1, 2009
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    train driver
    Location:
    hubli / karnataka
    Home Page:
    http://www.gmail.com
    let the data base store the date/time info in any manner that's not the problem to calculate the lapsed period between the two times

    is dataediff("n",fieldLogintime,fieldLogOuttime) is not working !
    please post your SQL statement
     

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