Link to home
Start Free TrialLog in
Avatar of BKennedy2008
BKennedy2008

asked on

Crystal Reports Round time to nearest Quarter

I have a DateTime Var  that I need to round to the nearest quarter.
7:19 AM, round to 7:15 am,.......Normal rounding rules for time values.
If I need to convert to decimal time, then round, and change back to normal time, not sure how to go about that, if you could help.
Thanks
Avatar of Mike McCracken
Mike McCracken

You could convert the time to minutes then round using a formula like below then convert back to time

Round ( {database.field} / 4, 0 ) * 4

You can also create a formula that tests for intervals in the minutes and rounds the time.

mlmcc
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BKennedy2008

ASKER

Thanks again- You have been a time-saver for sure for not re-creating the wheel!
I basically used your formulas without converting into my report with small modifications.
Thanks Again-