
Calculating Time
Hi, I got the actual calculation working, but if you enter 0950 for in time and 1735 for out time. you get 785. i need to find some way to get the time calculated as real time values

RE: Calculating Time
I dont think there is a method to calculate so, but i can suggest a logic it might be usefull for u in building a vbscript function. <BR>get the seconds (eg 1000000) <BR>to convert into min divide by 60 (16666.6666666666666666) <BR>check the value and if it is more than 60 than divide ity again by 60 to get the number or hrs (277.7777777777....) <BR>check the value and if it is greater than 24 divide the value by 24 to get the number of days (11.57407040.....) once you get the number of days split the days seperatly using the split keyword finding for the period(.) on the result (.5740704...) this will give you the fractional day value multiply that by 24 (13.77777777....) using the split again split the numbers of hrs and mulitiply the fractional value (.77777777777) again by 60 to get the minutes remaining (46.6666666666666) again split the value and multiply the remaining fractional (.666666.....) value with 60 to get the seconds remaining (40), once you got the all thse values you can very well club those like <BR>11 days, 13 hrs 46 minutes and 40 seconds. <BR>The logic should be something like this, i hope this will work, even there might be some logic which is quite simpler than this, try your best.

RE: Calculating Time
What i'm trying to do is make a payroll timesheet. The user enters time in and out 2 times for each day. They dont get paid lunch breaks =( . And when the user click off the time out, it calculates the time for that day. they do this 7 times, then it calculates the week total. but i need somekinda function that will break it down into real time. not greater than 60min

RE: Calculating Time
you can build a vbscript function which will take the paratmeter of seconds as an input and pass the hours, minutes and seconds as a output, once you got the minute difference try with the logic i gave u above.

RE: Calculating Time
i think i got a way to do it. but, i dont know how to pass a form onblur event to a vb script. can you help?
Posting Permissions
 You may not post new threads
 You may not post replies
 You may not post attachments
 You may not edit your posts

Forum Rules

