refiking Posted May 4, 2009 Share Posted May 4, 2009 I have a date filed in a table on the DB that has entries like this: 1240937520 What I need to know is how can I convert the current time to this format so I can insert it into the db? Link to comment https://forums.phpfreaks.com/topic/156846-solved-format-date-for-entry-into-db/ Share on other sites More sharing options...
Maq Posted May 4, 2009 Share Posted May 4, 2009 strtotime? Link to comment https://forums.phpfreaks.com/topic/156846-solved-format-date-for-entry-into-db/#findComment-826193 Share on other sites More sharing options...
refiking Posted May 4, 2009 Author Share Posted May 4, 2009 Thanks. I put strtotime('NOW') and it works perfectly. Link to comment https://forums.phpfreaks.com/topic/156846-solved-format-date-for-entry-into-db/#findComment-826201 Share on other sites More sharing options...
Maq Posted May 4, 2009 Share Posted May 4, 2009 That's called a, "UNIX Timestamp", BTW. Link to comment https://forums.phpfreaks.com/topic/156846-solved-format-date-for-entry-into-db/#findComment-826204 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.