Normal Topic ceiling function? (Read 245 times)
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
ceiling function?
Jan 4th, 2024 at 12:47am
Print Post Print Post  
Hello,

Does Sesame have something like a ceiling function like excel?
or a similar formular. 

Happy New Year!!
-flip
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged
 
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
Re: ceiling function?
Reply #1 - Jan 6th, 2024 at 10:29pm
Print Post Print Post  
Found It!

Wanted to round up to the 1/4 hour for billing labor rate.

This is what I did.....

var vTime as Double
var vFrac as Double

vFrac = @Frac(Total_time)
vTime = @Int(Total_Time)

If (vFrac = .25) or (vFrac = .50) or (vFrac = .75) or (vFrac = .00)
     {
           RndUp = Total_Time
     }
If (vFrac > .00) And (vFrac < .25)
     {
           RndUp = (vTime + .25)
     }
If (vFrac > .25) And (vFrac < .50)
     {
           RndUp = (vTime + .50)
     }
If (vFrac > .50) And (vFrac < .75)
     {
           RndUp = (vTime + .75)
     }
If (vFrac > .75) And (vFrac <= .99)
     {
           RndUp = (vTime + 1)
     }
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged