what are mysql date and time function

This tutorial about  Date and Time Types in mysql

It is very interesting and good for initial programmer as well as for those who want a keep not on Date and Time Types; they would find it interesting and fine !

bool checkdate (int month, int day, int year)
Returns TRUE if the date given is valid; otherwise returns FALSE. Checks the validity of the date formed by the arguments.
A date is considered valid if:

  1. Day is within the allowed number of days for the given month. Leap years are taken into consideration.
  2. year is between 1 and 32767 inclusive
  3. month is between 1 and 12 inclusive

<?php
// Let ‘s suppose that today ‘s date is : April 20th, 2010, 7:32:22 pm

  1. $today = date(“F j, Y, g:i a”); // March 20, 2010, 7:32 pm
  2. $today = date(“m.d.y”); // 20.04.10
  3. $today = date(“Ymd”); // 20100420
  4. $today = date(‘h-i-s, j-m-y ‘); // 07-32-22, 20-04-10
  5. $today = date(“j, n, Y”); // 20, 4, 2010
  6. $today = date(‘\i\t \i\s \t\h\e jS \d\a\y.’); // It is the 20th day.
  7. $today = date(“H:i:s”); // 17:16:17
  8. $today = date(“D M j ); // Tu Apr 20

?>