V
V
Viktoria Smirnova2018-04-10 14:28:16
MySQL
Viktoria Smirnova, 2018-04-10 14:28:16

Storing time in a database?

How to store time in the database, but with the condition that known time intervals - 15,20, 45 minutes, 1 and 2 hours during the day will be requested and filled with an event. The task is to make a diary. It is better to make a separate table with free time and separately with busy time, but then how will they be synchronized with each other? Who has any thoughts?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2018-04-10
@Vika7

Store the beginning and end of the event in the datetime type, and provide the intervals with logic. And do not store unassigned intervals - only created events.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question