O'Reilly logo

Mastering phpMyAdmin 3.1 for Effective MySQL Management by Marc Delisle

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

DATE, DATETIME, and TIMESTAMP

We could use a normal character field to store date or time information. But DATE, DATETIME, and TIMESTAMP are more efficient for this purpose. MySQL checks the contents to ensure valid date and time information, and offers special functions to work on these fields.

Calendar pop up

As an added benefit,phpMyAdmin offers a calendar pop up for easy data entry.

We will start by adding a DATE fielddate_published—to our book table. If we go into Insert mode, we should now see the new field where we could type a date. A Calendar icon is also available:

Calendar pop up

This icon brings a pop-up window, synchronized to this DATE field. If there ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required