February 15, 201114 yr Hi all! I'm trying to make a more firendly way of entering time-of-day data into two fields, let's call them TimeStart and TimeEnd. What I'd like to have is an interface which: 1)allows typing the time in continuoous form, ommiting the separator, 2)allows for setting the time by using two buttons beside the time field (increase/decrease) for a specified increase/decrease time step 3)cycles between 00:00 and 23:59 (time-of-day strict data type) Currently, I have a script for the increase/decrease buttons by using a Set Field script step attached that uses the following formula: Time(hour(timestart);minute(timestart)+15;"00") But I have the problem time doesn't cycle in the range 00:00-23:59 and keep increasing. Do you have any ideas?
February 15, 201114 yr Author Re your script, try = Mod ( TimeStart + 900 ; 86400 ) What does that do?
February 15, 201114 yr It adds 900 seconds to TimeStart, and rolls back to 0 when the result crosses midnight.
February 15, 201114 yr Author It adds 900 seconds to TimeStart, and rolls back to 0 when the result crosses midnight. Ok but I can't understand where this calc should be put. Also, what about subtracting 15' from the time?
February 15, 201114 yr I can't understand where this calc should be put. In the Set Field[] script step. Also, what about subtracting 15' from the time? Use minus instead of plus (how cool is that?).
Create an account or sign in to comment