Nov 7, 2002 #1 fkwong Programmer Jul 5, 2002 65 US How to calculate two datetime values to get a turnaround time in HH:MM. I try CTOT("12:51:54"-CTOT("08:07:13"/3600 = 4.7447 which is not correct. Thanks for your help.
How to calculate two datetime values to get a turnaround time in HH:MM. I try CTOT("12:51:54"-CTOT("08:07:13"/3600 = 4.7447 which is not correct. Thanks for your help.
Nov 7, 2002 #2 wgcs Programmer Mar 31, 2002 2,056 EC First, remember operator precedence: CTOT("12:51:54"-CTOT("08:07:13"/3600 = 4.7447 will divide first... you want: ( CTOT("12:51:54"-CTOT("08:07:13" ) /3600 = 4.7447 Upvote 0 Downvote
First, remember operator precedence: CTOT("12:51:54"-CTOT("08:07:13"/3600 = 4.7447 will divide first... you want: ( CTOT("12:51:54"-CTOT("08:07:13" ) /3600 = 4.7447
Nov 7, 2002 Thread starter #3 fkwong Programmer Jul 5, 2002 65 US Yes, but the result should be close to 4 hour and 44 minutes right? Upvote 0 Downvote
Nov 7, 2002 1 #4 rgbean Programmer Nov 9, 2000 5,707 US Yes, and 60 * 0.7447 is 44.6820 minutes! 4.7447 is hours, so to get the minutes, take the fractional hours and multiply by the 60 minutes in an hour. Rick Upvote 0 Downvote
Yes, and 60 * 0.7447 is 44.6820 minutes! 4.7447 is hours, so to get the minutes, take the fractional hours and multiply by the 60 minutes in an hour. Rick
Nov 7, 2002 1 #5 ramani Programmer Mar 15, 2001 4,336 AE HI t1=DATETIME() t2=DATETIME() d1 = t2-t1 && difference in seconds hh= FLOOR((t2-t1)/3600) mm= FLOOR((t2-t1)/60)-hh*60 ss=MOD(t2-t1,60) ? STR(hh,2)+":"+STR(mm,2)+":"+STR(ss,2) ramani (Subramanian.G),FoxAcc, ramani_g@yahoo.com Upvote 0 Downvote
HI t1=DATETIME() t2=DATETIME() d1 = t2-t1 && difference in seconds hh= FLOOR((t2-t1)/3600) mm= FLOOR((t2-t1)/60)-hh*60 ss=MOD(t2-t1,60) ? STR(hh,2)+":"+STR(mm,2)+":"+STR(ss,2) ramani (Subramanian.G),FoxAcc, ramani_g@yahoo.com
Nov 7, 2002 #6 Mike Gagnon Programmer Apr 6, 2002 8,067 CA Rick Yes, and 60 * 0.7447 is 44.6820 minutes! 4.7447 is hours, so to get the minutes, take the fractional hours and multiply by the 60 minutes in an hour. I knew how to do it, but I never seen the explanation written out. You get my mark.TKS Ramani Ramani always "le mot juste" (loose translation "always the right word" You get my mark. Mike Gagnon If you want to get the best response to a question, please check out FAQ184-2483 first Upvote 0 Downvote
Rick Yes, and 60 * 0.7447 is 44.6820 minutes! 4.7447 is hours, so to get the minutes, take the fractional hours and multiply by the 60 minutes in an hour. I knew how to do it, but I never seen the explanation written out. You get my mark.TKS Ramani Ramani always "le mot juste" (loose translation "always the right word" You get my mark. Mike Gagnon If you want to get the best response to a question, please check out FAQ184-2483 first