Jan 27, 2009 #1 Brianfree Programmer Feb 6, 2008 220 GB Hi, if i have a date in the following format... 2009-01-27 13:59:37 how can i calculate the difference between the current date and this date in days? many thanks brian
Hi, if i have a date in the following format... 2009-01-27 13:59:37 how can i calculate the difference between the current date and this date in days? many thanks brian
Jan 27, 2009 #2 feherke Programmer Aug 5, 2002 9,541 RO Hi Code: $diff=(time()-strtotime("2009-01-17 13:59:37"))/24/60/60; Or see [tt]date_diff()[/tt]. Feherke. http://rootshell.be/~feherke/ Upvote 0 Downvote
Hi Code: $diff=(time()-strtotime("2009-01-17 13:59:37"))/24/60/60; Or see [tt]date_diff()[/tt]. Feherke. http://rootshell.be/~feherke/
Jan 27, 2009 Thread starter #3 Brianfree Programmer Feb 6, 2008 220 GB Hi thanks for the fast reply!!! I have got it working but i get results like ... 0.048333333333333 Can this be converted to full days? many thanks... Brian Upvote 0 Downvote
Hi thanks for the fast reply!!! I have got it working but i get results like ... 0.048333333333333 Can this be converted to full days? many thanks... Brian
Jan 27, 2009 #4 feherke Programmer Aug 5, 2002 9,541 RO Hi See [tt]round()[/tt], [tt]floor()[/tt] and [tt]ceil()[/tt]. Feherke. http://rootshell.be/~feherke/ Upvote 0 Downvote
Hi See [tt]round()[/tt], [tt]floor()[/tt] and [tt]ceil()[/tt]. Feherke. http://rootshell.be/~feherke/