Reid Posted August 25, 2010 Posted August 25, 2010 How can I limit a time field to accept only 15 min increments? ie 10:00 AM, 10:15 AM, 10:30AM, etc.
Ocean West Posted August 25, 2010 Posted August 25, 2010 Several ways provide a time popup one of hour / one for minute the minute field could be a set using 0 / 15 / 30 / 45 You could also round the value entered to the nearest increment. or a validation calc If ( Minute ( time ) = 0 or Minute ( time ) = 15 or Minute ( time ) = 30 or Minute ( time ) = 45 ; True ; False )
Raybaudi Posted August 26, 2010 Posted August 26, 2010 ... but the time field could contain 59 seconds ( 10:15:59 ) and pass the validation. It's better: not Mod ( Self ; 60*15 ) P.S. Stephen, could you read my post: "Is it broken ?" :
Reid Posted August 26, 2010 Author Posted August 26, 2010 Where do I put that? Do I type it into a validation calculation?
Reid Posted August 26, 2010 Author Posted August 26, 2010 This works good since my format doesn't have any seconds. Is there a way though to have it automatically change instead of just giving a validation warning?
Reid Posted August 26, 2010 Author Posted August 26, 2010 So both work fine. Is there a way to have it automatically change when they type it in?
Raybaudi Posted August 26, 2010 Posted August 26, 2010 Yes, there is. You'll need to eliminate the calculation into the validation option fot that field and, instead, put a calculation into the auto-enter option for that same field. A calculation that works may be: Time ( Hour ( Self ) ; Case( Minute ( Self ) < 8 ; 0 ; Minute ( Self ) < 23 ; 15 ; Minute ( Self ) < 38 ; 30 ; Minute ( Self ) < 53 ; 45 ; 60 ) ; 0 ) P.S. I remember that "comment" made a better calculation
Raybaudi Posted August 26, 2010 Posted August 26, 2010 That was it !! ( ... and it is the best ) I forgot that one. BTW, searching a better one than previous mine, I reached: Time ( Hour ( Self ) ; Div ( Minute ( Self ) + 7 ; 15 ) * 15 ; 0 )
Reid Posted August 26, 2010 Author Posted August 26, 2010 Comment to the rescue again! Do I use this as a validation or a calculation?
comment Posted August 26, 2010 Posted August 26, 2010 It's a calculation - it rounds time to the nearest quarter-hour.
Recommended Posts
This topic is 5261 days old. Please don't post here. Open a new topic instead.
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 accountSign in
Already have an account? Sign in here.
Sign In Now