Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

time divisible by .25 1

Status
Not open for further replies.

traycee

IS-IT--Management
Sep 6, 2001
245
US
I have a form where the user enters the starttime and the endtime and then a calculated control on the form figures the difference between the two fields on the form using this formula =DateDiff("n",[startTime],[endTime])/60. The data entry person enters the time in quarter hour increments such as starttime = 11:15 a.m. endtime = 11:30 a.m. then the calculated control shows .25. However, if they typo and enter 11:00 to say 11:11 then I get something like .4333 or the like. Is there a way to prevent anything but times based on quarter hour intervals from being accepted?
 
Hi
How about a validation rule (?):
Format([StartTime],"n") In (0,15,30,45)
 
Thank you! The solution is simple and easy to implement.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top