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
Detailed description of mysql to obtain the current date and format, detailed description of mysql current date
MySQL obtains the current date and Date Format
Get system date: NOW ()
Format date: DATE_FORMAT (date, format)
Note: date: Time
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
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
MYSQL gets the current date and date formatGet system Date: now ()Formatted Date: date_format (date, format)Note: Date: Time fieldFormat: Date formatsReturns the system date, output 2009-12-25 14:38:59Select Now ();Output 09-12-25Select Date_format (
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 function 1.1 Get the current date + time (date + times) function: Now () Mysql> Select Now (); +---------------------+ | Now () | +---------------------+ | 2008-08-08 22:20:46 | +---------------------+ In
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.