educative.io

Educative

Why duration for 'Movie' table is datetime instead of int

Why duration for ‘Movie’ table is datetime instead of int

Hi @Akash_Jain,

Datetime can store more details compared to an ‘int’. The other option, as you suggested, will be to store the number of minutes (or seconds, depends upon the use case) as an ‘int’.

Hope this clarifies your question.