Restrict user input DateTime field to 15 minute intervals and default to the top of the next hour

The DateTime column type is, by default, kind of unfriendly for users.  Even without setting an initial value, the widget defaults to the current day/time, which isn't so bad except you inevitably force a user to deal with fiddly stuff like setting the exact minutes, seconds and so on.  I'd like to make my DateTime field default to the top of the next hour (so if it's 2:10pm it would default to 3:00), or the next even 15 minutes, something easier for users to deal with like that.  I'd then prefer it to only allow 15 minute increments to be selected.  Is this possible?  It seems like it would be a common UX concern.

I'd be happy if I could just the initial value to a nice even time for my users.  I've been fiddling with expressions to no avail.  Thanks!

0 2 136
2 REPLIES 2

I haven't tried this but it looks somehow logical to me: 

As initial value you can use this to round up to the next hour: 

NOW() + ("01:00:00" - TIME(NOW()))

2- use a valid if expression, in the data section click the edit beside your datetime column and scroll down to valid if and use this 

HOUR([ColumnName])*60 + MINUTE([ColumnName]) = ROUNDUP((HOUR([ColumnName])*60 + MINUTE([ColumnName]))/15, 0)*15

 

@Hussein_Osseily I like your thinking.  The first expression just produces 1:00AM however, not 1 hour in the future.  I'll try to tweak it from there and see if I can get it to do what you intended.  Thanks!

Top Labels in this Space