nichanson Posted July 28, 2008 Share Posted July 28, 2008 After meny hours trying to understand this unix time system, I wrote this code to post my database timestamp (I'm still a beginner): $time_st = date("h, m, s, d, m, y",$row['date']); $time_fn = mktime($time_st); $time2 = date("d M Y",$time_fn); Is this a valid way to do it as all the other tutorials make it sound so difficult or is there an easier way to do it? Nick Quote Link to comment Share on other sites More sharing options...
fenway Posted July 28, 2008 Share Posted July 28, 2008 Why use timestamps at all? Insert a proper SQL-99 date YYYY-MM-DD HH:MM:SS Quote Link to comment Share on other sites More sharing options...
nichanson Posted July 29, 2008 Author Share Posted July 29, 2008 Sorry for late reply I'm sorry but I'm not familar with this technique as I've only just been getting into timestamps, if possible can you give a simple example. thx Nick Quote Link to comment Share on other sites More sharing options...
fenway Posted July 31, 2008 Share Posted July 31, 2008 That is, make it a proper DATETIME field. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.