Home arrow MySQL arrow Practical Date/Time examples with PHP and MySQL
MYSQL

Practical Date/Time examples with PHP and MySQL


In this article Mauricio shows us some examples of how to use the date/time features with MySQL and PHP including the UNIX timestamp and the PHP date_diff() function.

Author Info:
By: Mauricio Cuenca
Rating: 4 stars4 stars4 stars4 stars4 stars / 44
January 12, 2003
TABLE OF CONTENTS:
  1. · Practical Date/Time examples with PHP and MySQL
  2. · The UNIX timestamp
  3. · How old are you? (exactly)
  4. · Dates with MySQL
  5. · Date Addition and Subtraction
  6. · Conclusion

print this article
SEARCH DEVARTICLES

Practical Date/Time examples with PHP and MySQL
(Page 1 of 6 )

Some time ago working with dates and times was a pain for me. In several of my projects I had to calculate a person's age based on their birth date. I created a members area that allowed the administrators to set the maximum amount of time users can have a password before they must change it and remind each one how many days left before the change. I also had to create time-bomb accounts that worked for several days after its creation and then became useless.

Digging into the PHP and MySQL documentation I found and then worked with several functions that made my life easier. Now I want to share some code tips that allow better manipulation of the time and date in your projects and everyday needs.
blog comments powered by Disqus
MYSQL ARTICLES

- MySQL and BLOBs
- Two Lessons in ASP and MySQL
- Lord Of The Strings Part 2
- Lord Of The Strings Part 1
- Importing Data into MySQL with Navicat
- Building a Sustainable Web Site
- Creating An Online Photo Album with PHP and ...
- Creating An Online Photo Album with PHP and ...
- PhpED 3.2 More Features Than You Can Poke ...
- Creating An Online Photo Album with PHP and ...
- Creating An Online Photo Album with PHP and ...
- Security and Sessions in PHP
- Setup Your Personal Reminder System Using PHP
- Create a IP-Country Database Using PERL and ...
- Developing a Dynamic Document Search in PHP ...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials