nightdesigns Posted December 15, 2004 Posted December 15, 2004 I have 2 Date Calculations I need to figure out, and I figured I'd ask them here first before driving myself crazy trying to get it right. Duration Between two times would be time2-time1? How do i get it be a duration and not an AM or PM? How about if time2 goes into the next day? And here's the hard one. The result of that duration needs to be multipled with a percentage, I.E. a 6 second duration times 10% equals 1 second. How would I do that? What I'm trying to achieve is this ... I have a bunch of lenghty functions, I will know the average duration of them (caluclation #1). With that average, i will then use it to let the user know approximatly how much time is remaining based on where in the script the process is, and the average time for the entire call. Thanks.
-Queue- Posted December 15, 2004 Posted December 15, 2004 (End Date - Start Date) * 86400 + time2 - time1 Don't make the result a time field. It should be a number for the number of seconds elapsed. I'm not understanding your second question. How does 6 seconds * 0.1 = 1 second?
nightdesigns Posted December 15, 2004 Author Posted December 15, 2004 My bad, i meant 10 seconds * 1% = 1 second. keep in mind too, result may be hours/mintues/seconds.
Recommended Posts
This topic is 7352 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now