Should the "Time" datatype be used for displaying a regularly set time? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Should the "Time" datatype be used for displaying a regularly set time?

For example, if I specify a time to workout, then would i store that as an integer and convert on the front end, or should i store it as a time?

5th Mar 2017, 3:49 PM
Ian
1 Answer
+ 6
I would personally store it as an integer, and I'll use PHP to do the conversion back to something understandable opposed to 1576578758 - you can use JavaScript on the front end with it too.
5th Mar 2017, 9:55 PM
Mark Foxx
Mark Foxx - avatar