Reputation: 4744
If i have an event with a date, and then want the user to state a start time and a end time, what is the best / most standard way to represent that in the db?
Is there a time data type or should i just have start_at end_at in the database and convert whatever is in the UI to that?
Upvotes: 0
Views: 66
Reputation: 79
If you're using MySQL you can use TIME datatype to store a time.
Upvotes: 1
Reputation: 1516
You can use the timestamp. Why not use it to mark the start and end points in time. You can transform them in your application to some more useful Time/Date type.
Upvotes: 0