How to calculate the number of days between now and then ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
bluenote
Forum Commoner
Posts: 93
Joined: Sat Mar 01, 2003 4:59 am
Location: Heidelberg, Germany

How to calculate the number of days between now and then ?

Post by bluenote »

Hi there,

it's only a small thing but it starts making me nervous :evil: :

I have the present date and a date in the future, i. e. 2004-03-31. The future date is the last time "my" users can input something into the db. So everytime a user runs the insert script, i want to print a notice like

You have 3 days left!

Has anyone an idea?
digital5
Forum Newbie
Posts: 9
Joined: Sat Feb 28, 2004 6:07 am
Location: Chelmsford, UK

Post by digital5 »

are you using mysql? I know mysql has really stong date and time features.
Post Reply