Sami Posted August 21, 2011 Share Posted August 21, 2011 How do I put the full date into the database?(including seconds) How can I make the script tell how long time ago a date was? I'm creating a Norwegian web page, tough, so: Second(s) = sekund(er) Minutte(s) = minutt(er) Hour(s) = tim(er) Day(s) = dag(er) Week(s) = uke( r ) Year(s) = år Link to comment Share on other sites More sharing options...
justsomeguy Posted August 21, 2011 Share Posted August 21, 2011 Use the time function to generate timestamps:http://www.php.net/manual/en/function.time.phpThey're just numbers, so you can add and subtract. You can use the date, mktime, and getdate functions to format the timestamp for printing or get other information about it. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.