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 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
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 TypeMySQL Date Type: Date format, occupied storage space, date range comparison.Date type storage space Date format date range------------ --------- --------------------- -----------------------------------------DateTime 8 bytes
MySQL timestampdiff () functions are much more powerful than datediff () functions. datediff () can only calculate the number of days for the difference between two dates.
Mysql common date addition and subtraction functions and instance
Turn from:http://blog.chinaunix.net/space.php?uid=11327712&do=blog&id=32416MySQL Date Type: Date format, occupied storage space, date range comparison.Date type storage space date format date range-----------------------------------------------------
The difference between a date datetime timestamp in a transfer databaseDATETIME, date, and timestamp types are related. This article describes their characteristics, how they are similar and different.A datetime type is used when you need a value
Blog. csdn. netkangbrotherarticledetails7030304MYSQL obtains the current date and date format. system date: NOW () formatted date: DATE_FORMAT (date, format) Note: date: Time Field format: returns the system date, output 2009-12-2514: 38: 59
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.