April 26, 20169 yr I need to create a 'Duration' field for a Table of movies to enter the Hours / Mins / Seconds. The 'Time' Field type seems to be designed for time of day, not a length of time, and it seems like it could be used for my purposes here, since no film would be longer than 24 hours. Since the Time field is stored a numerical value of seconds, it would seem to 'behave' as I'd want it too, and I could use calculations to render the time in minutes or hours and minutes as needed. But is this a 'best practice'? Am I overlooking some potential unintended and unwanted consequences using a Time Field for Duration as opposed to time of day? Something that will come back to haunt me? if so, what is the alternative -- creating 3 fields for Hr/Min/Sec and manipulating them as needed?
April 26, 20169 yr 32 minutes ago, Wickerman said: The 'Time' Field type seems to be designed for time of day, No, it is perfectly suitable for durations as well. 33 minutes ago, Wickerman said: it seems like it could be used for my purposes here, since no film would be longer than 24 hours. There's no problem with using a Time field for storing durations that exceed 24 hours either. 34 minutes ago, Wickerman said: But is this a 'best practice'? That depends on your situation, but in general I would say yes. But keep in mind that entering times is not as straightforward as entering dates, for example.
April 27, 20169 yr Author Thanks very much for the reassurance. Feel I can go forward confidently here.
Create an account or sign in to comment