dmccabe Posted June 17, 2008 Share Posted June 17, 2008 A couple of questions: 1) Is the unix timestamp the best to use when you may want to perform some calculations on a date/time field late on? if so 2) How do I insert the time stamp in to my database? I know how to do the insert, but what function grabs the current time stamp? Thanks in advance Link to comment https://forums.phpfreaks.com/topic/110630-unix-time-stamp/ Share on other sites More sharing options...
rhodesa Posted June 17, 2008 Share Posted June 17, 2008 I am still on the fence and switch back and forth between using datatype of DATETIME and INT in mysql. INT is how you would store the unix timestamp. I prefer timestamps cus they are timezone free and easier to do calculations on in PHP. But, with a DATETIME datatype you can do more calculations in the mysql query. And you can always convert it to a timestamp with the mysql function UNIX_TIMESTAMP(date) ....so choice is yours Link to comment https://forums.phpfreaks.com/topic/110630-unix-time-stamp/#findComment-567563 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.