August 25, 201015 yr How can I limit a time field to accept only 15 min increments? ie 10:00 AM, 10:15 AM, 10:30AM, etc.
August 25, 201015 yr 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 )
August 26, 201015 yr ... 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 ?" :
August 26, 201015 yr Author 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?
August 26, 201015 yr Author So both work fine. Is there a way to have it automatically change when they type it in?
August 26, 201015 yr 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
August 26, 201015 yr 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 )
August 26, 201015 yr Author Comment to the rescue again! Do I use this as a validation or a calculation?
Create an account or sign in to comment