Progress in mysql 4.1.1 worth paying attention
MySQL 4.1.1 has been brewed for a long time, in addition to the password hash verification changes from the diary, MySQL 4.1.1 is still dealt with, and the data backup is a good job.
In the reading of Mysql frequent updated changlog, I am happy to find that mysql finally joined the date processing function and the corresponding new data type.
UTC related,
UTC is the abbreviation of English universal time, Coordinated, and Chinese usually translated "World Standard Time", the academic institutions are called "Greenwich Average Time" early, in fact, no matter how to call, method. UTC has a very high accuracy of atom seconds as one of the most close to the world time. MySQL will introduce this precise timing method in 4.1.1. There are 3 functions associated with it: utc_date (), utc_time (), utc_timestamp ().
UTC_DATE ()
Returns the UTC date, there are two formats: 'YYYY-MM-DD' or 'YYYYMMDD'. Like other dates of MySQL, the return value generated by this function can also operate operation. example:
Mysql> select utc_date (), utc_date () 0; -> '2003-08-14', 20030814
From here, we can see that the utc_date () return value automatically performs (invisible) type conversion, participating in the operation return result.
UTC_TIME ()
Returns the UTC time, there are two formats: 'hh: mm: ss' or hHMMSS. Similarly, the return value of this function is also possible to operate. E.g:
MySQL> SELECT UTC_TIME (), UTC_TIME () 0; -> '18: 07: 53 ', 180753
UTC_TimeStamp ()
Also return UTC date and time, there are two formats: 'YYYY-MM-DD HH: MM: SS' or YYYYMMDDHHMMSS. Similarly, the return value of this function is also possible to operate. E.g:
MySQL> SELECT UTC_TimeStamp (), UTC_TimeStamp () 0; -> '2003-08-14 18:08:04', 20030814180804
Time handling
This part of the function is used to perform a specific operation of the date, time, etc., for example, the date of the N-day after the interval of two times / (or), intercepting a specific time period number.
(Endlessly)
Technical Support Site :: www.help2u.org mysql @ china