Jump to content



Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
Photo
- - - - -

Verify Times On Quarter Hour


1 reply to this topic

#1 cosmic

cosmic

    Newbie [ Level 2 ]

  • Members
  • 15 posts

Posted 14 November 2006 - 07:18 PM

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.

#2 pyost

pyost

    Way Out Of Control - You need a life :)

  • Members
  • 1,090 posts
  • Gender:Male
  • Location:Belgrade, Serbia
  • myCENTs:67.69

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

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