flOid Posted June 19, 2006 Share Posted June 19, 2006 Could someone provide me the code for outputting a timestamp of a given future time within the same day? Thanx a lot in advance! Quote Link to comment https://forums.phpfreaks.com/topic/12406-timestamp-of-future-dates/ Share on other sites More sharing options...
kenrbnsn Posted June 19, 2006 Share Posted June 19, 2006 I don't quite understand your question. Outputting a timestamp is the same whether the date/time is in the past, present, or future.Ken Quote Link to comment https://forums.phpfreaks.com/topic/12406-timestamp-of-future-dates/#findComment-47433 Share on other sites More sharing options...
flOid Posted June 19, 2006 Author Share Posted June 19, 2006 Sorry, PHP and programming newbie here.I learned about the time() function, but what I need is not the current time, but the code to output the Unix timestamp of a defined future time within the same day. Quote Link to comment https://forums.phpfreaks.com/topic/12406-timestamp-of-future-dates/#findComment-47436 Share on other sites More sharing options...
wildteen88 Posted June 19, 2006 Share Posted June 19, 2006 What do you by the same day? To get the times stamp of a future date do this:echo strtotime("+1 day");echo strtotime("+1 week");Orecho strtotime("25 December 2006"); Quote Link to comment https://forums.phpfreaks.com/topic/12406-timestamp-of-future-dates/#findComment-47440 Share on other sites More sharing options...
poirot Posted June 20, 2006 Share Posted June 20, 2006 mktime:[a href=\"http://www.php.net/mktime\" target=\"_blank\"]http://www.php.net/mktime[/a]It doesn't matter if it's from past, present or future. Quote Link to comment https://forums.phpfreaks.com/topic/12406-timestamp-of-future-dates/#findComment-47501 Share on other sites More sharing options...
flOid Posted June 20, 2006 Author Share Posted June 20, 2006 thanx everyone, actually the strtotime function was what I was looking for. Quote Link to comment https://forums.phpfreaks.com/topic/12406-timestamp-of-future-dates/#findComment-47517 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.