I need to verify that a text time entry (I know there's the time entry component, but nobody liked that one, they would rather type in a text form of the times) from a user input ends on the quarter hour. I know that I can split the entry apart and check the last two digits for 15, 30, 45 or 00, but was wondering if there's a different/better way.
| |
|
Welcome to AstaHost - Dear Guest | |
Verify Times On Quarter Hour
Started by cosmic, Nov 14 2006 07:18 PM
1 reply to this topic
#2
Posted 14 November 2006 - 07:27 PM
I don't think there's anything better. Just extract the last two digits (let's call it "exct" and set up this condition
Whereas there must be numerous solution to this, I am sure you don't want to complicate things unnecessarily.
if (exct mod 15 = 0) and (exct < 46) then condition:=true;
Whereas there must be numerous solution to this, I am sure you don't want to complicate things unnecessarily.
Reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











