Verify Times On Quarter Hour

free web hosting
Free Web Hosting > Computers & Tech > Programming > Programming General > Delphi & (Object) Pascal

Verify Times On Quarter Hour

cosmic
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.

Reply

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

CODE
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


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : verify times quarter


    Looking for verify, times, quarter, hour

Searching Video's for verify, times, quarter, hour
advertisement




Verify Times On Quarter Hour



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE