This allows for rounding to the nearest 15 minutes EXCLUDING any seconds. Meaning this will look at the 7-8 minute (no seconds) mark as far whether it will round up (8 minutes or greater) or down (7 minutes or less) by 15 minutes:
a = mid(intime, 4,2); b = mid(outtime, 4,2);
if (within (a, "07|22|37|52")) {roundin("D15");} else {roundin("N15");}
if (within (b, "07|22|37|52")) {roundout("D15");} else {roundout("N15");}
| |