Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
CSC CIS — — source: Informix-list mailing list archive (1991-1998)
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"
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.