![]() |
| ||
| Getting Future Date I don't know how to explain this correctly but just some sample for you guys so that you can really get what Im trying to say. Today is November 28, 2008 3 days from now is December 1,2008 Im looking for a php code, which can give me the exact date giving the number of days interval prior to the current date. I've been looking for a thread which can solve or even give a hint on how to solve this one but I found none. |
| ||
| Re: Getting Future Date Is it so difficult to use google with keywords search php+get+date+future. From what I got from this search even me with no interest in PHP could make that part of the code work... |
| ||
| Re: Getting Future Date I have created a script for you to fiddle with and is below. The below script is a function where you can enter the number of days, months and years untill the future date and the function will return what that date is. <? |
| ||
| Re: Getting Future Date @cwarn23 great! thanks alot for the code.. i haven't tried it yet.. but will let you know if there are any problems with it.. |
| ||
| Re: Getting Future Date Hi I really doubt whether this piece of code will work for every date.. It might not work with february date, leap years, and for months with months with 30 days like april.. Im providing you with some other code sample, that can work for most of the cases... <?php |
| ||
| Re: Getting Future Date sikka_varun and cwarn23 thanks alot for the codes.. I make some modifications to fit my need from your work guys. basically the changes are adding a parameter so that I can choose what date I want to start counting off. Here is the outcome: function count_to_date($sqldate,$day,$month,$year) can be called by echo count_to_date("2007-07-01 06:00:00",5,0,0);and the output will be 2007-07-06 06:00:00 anyways,thanks alot for the suggestions and the sample code.. i really appreciate it. |
| All times are GMT -4. The time now is 11:26 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC