Jul 28, 2004 #1 Krusher IS-IT--Management Jan 2, 2003 70 US Folks, How can I convert a decimal number to a time value in Crystal Reports 8.5 or 9.0 (Example: .75 to 1:15 or to 1.15) Thanks in advance! -K
Folks, How can I convert a decimal number to a time value in Crystal Reports 8.5 or 9.0 (Example: .75 to 1:15 or to 1.15) Thanks in advance! -K
Jul 28, 2004 #2 GJParker Programmer Jul 4, 2002 1,614 GB you could use this formula to give the same answer as your example int(0.75/0.6) + remainder(0.75,0.6) but what is 0.75 ? HTH Gary Parker MIS Data Analyst Manchester, England Upvote 0 Downvote
you could use this formula to give the same answer as your example int(0.75/0.6) + remainder(0.75,0.6) but what is 0.75 ? HTH Gary Parker MIS Data Analyst Manchester, England
Jul 28, 2004 1 #3 lisanguyen Technical User Jul 26, 2004 12 CA Hi, What you want to do is divide by 60. The whole number you get will be your hours and the remainder will be your minutes. Based on the example you provided, your formula could look like this: numbervar x := .75; numbervar hh := truncate(x * 100/ 60); numbervar mm := remainder(x * 100,60); totext(hh,0,"") + ":" + totext(mm,0,"") Upvote 0 Downvote
Hi, What you want to do is divide by 60. The whole number you get will be your hours and the remainder will be your minutes. Based on the example you provided, your formula could look like this: numbervar x := .75; numbervar hh := truncate(x * 100/ 60); numbervar mm := remainder(x * 100,60); totext(hh,0,"") + ":" + totext(mm,0,"")