Jump to content
xisto Community
Sign in to follow this  
cosmic

Verify Times On Quarter Hour

Recommended Posts

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.

Share this post


Link to post
Share on other sites

I don't think there's anything better. Just extract the last two digits (let's call it "exct" and set up this condition

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.