MySQL date data type and time type usage summary MySQL date type: Date format, storage space occupied, date range comparison.
Date type storage space date format date range
-----------------------------------------------------------------------------
MySQL date type: Date Format, storage space occupied, and date range comparison.Date type storage space date format date range-----------------------------------------------------------------------------------Datetime 8 bytes YYYY-MM-DD hh: mm: SS 10
Date and Time functionsThis chapter discusses some functions that can be used to manipulate time values. See section 11.3, "Date and Time type" for valid formats for each time and date type with a range and a specified value.
The following example
MySQL obtains the current date and time stamp function bitsCN.com
MySQL returns the current date, time, and timestamp.
1.1 obtain the current date + time (date + time) function: now ()
Mysql> select now ();
+ ------- +
| Now () |
+ ------- +
| 22:2
The method of calculating the time difference in PHP and MySQL is detailed, MySQL time difference
Calculating the time difference in PHP is sometimes a hassle! But as long as you've mastered the use of datetime functions, that's a simple thing to
MySQL obtains the function Summary of the current date and time. For more information, see.
MySQL obtains the function Summary of the current date and time. For more information, see.
1.1 obtain the current date + time (date + time) function: now ()
MySQL: Summary of date functions and time functions bitsCN.com
Published inWww.sqlstudy.com1. MySQL obtains the current date and time function
1.1 obtain the current date + time (date + time) function: now ()
mysql> select now();+-------------------
MySQL returns the current date and time function summary bitsCN. com1.1 returns the current date + time (date + time) function: now ()
Mysql> select now ();
+ --------------------- +
| Now () |
+ --------------------- +
| 22:20:46 |
+ -------------
First, MySQL gets the current date time function1.1 Get the current date + time (date + times) function: Now ()Mysql> Select Now (); +---------------------+| Now () |+---------------------+| 2015-01-22 22:20:46
Original link:MySQL time and date function-Redfox-Blog ParkHttp://www.cnblogs.com/redfox241/archive/2009/07/23/1529092.html--------------------------------------------------------------------------------------------------------------- ---------------
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.