how to find the average between total records and total time in vb.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • progvar
    New Member
    • Feb 2008
    • 40

    how to find the average between total records and total time in vb.net

    Hi
    I used the formula in xls sheet like
    = 985 / (2:26:25 *24) * 7.5
    and i got answer = 7:38:47 and then i changed the format of cell into number and final answer is 3027
    where 7.5 is total time of one shift and 2:26:26 is the working time in that shift
    now I want to calculate this all in vb.net but i am not getting any idea
    i used the following code

    dim totalRec as double =985
    dim totalTime as string = "2:26:25"
    dim Avg as double
    avg = totalrec / (totaltime * 24) * 7.5

    but the output is different
    please give me some idea how to solve this probleum

    best regards
    variner
Working...