8 Replies Latest reply: Nov 8, 2012 8:45 AM by Göran Hofstedt RSS

    A little help with the maths please (base 100 to 60)

    Göran Hofstedt


      I have a field with numbers that ain´t in any timeformat. But the users knows that 0,15 are 15 min and 54,30 are 54 hours and 30 min.

      But the calculation don´t end up correct beacuse qv use base 100 and the above field base 60. How can I sum the field correct?

      So for example, 0,15 * 13 should give 3,15  (the user sees it as 3h and 15 min)


      My guess is then that I don´t have to convert it into any timeformat but how should I do to so it count on base 60

      0,15 / 60*100 *13 gives me the right answer but in the wrong formate beacuse the user whant to see 3,15 and not 3,25 and it fails when it goes over 0, xxx


      The hard part I think is to get the sum of 1,15 + 1,15 to work out where the "1" acutally don´t have to be changed. I´m feeling a bit messy after som hours trying diffrent approch so hopefully anyone here can help me out.