RE: rounding interval type to nearest 15 minute
Posted in 1996
Marc How about rounded_interval = (interval % 15) < 7.5 ? interval - (interval % 15) : interval + (15 - (interval % 15)); This is C code, but you can adapt 4GL (or any other language) to the same logic. You can even write a function or macro to reuse it. Hope this helps Sujit Pal DBA, Computer Sciences Corp. ---------- From: Marc Kneppers[SMTP:marc@pamco.com] Sent: Thursday, October 17, 1996 9:27 AM To: informix-list@rmy.emory.edu Subject: rounding interval type to nearest 15 minute Well, the subject says it all. ANyone have an easy way of rounding an interval up or down to the nearest 15 minute interval? am I missing something obvious? MArc -------------------------------------------------------------------------- Marc Kneppers System Administrator and Everything-Under-the-Sun-guy PAMCO marc@pamco.com -------------------------------------------------------------------------- "Kiss my Royal Canadian"