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
1.1 Get the current date + time (date + times) function: Now ()Mysql> Select Now (); + ——————— + | Now () | + ——————— + | 2013-04-08 20:56:19 | + ——————— +In addition to the now () function to get the current datetime, MySQL has the following
For operations on string positions, the first position is marked as 1.
ASCII (str)
Returns the ASCII code value of the leftmost character of the string str. If Str is an empty string, returns 0. If STR is NULL, returns NULL.
Mysql> Select ASCII (' 2
MySQL functions and Usage examples
String functions
ASCII (str)Returns the ASCII value of the first character of the string 'str' (0 is returned when 'str' is an empty string)Mysql> select ASCII ('2 ');-> 50Mysql> select ASCII (2 );-> 50Mysql>
Jackson/fastjson Serialization/deserialization:By default, Jackson/fastjson serializes the Java date/timestamp type to a timestamp, which is the number of milliseconds since 0 o'clock on January 1, 1970. If you want to display a user-friendly
String functionsASCII (str)Returns the ASCII value of the first character of the string str (str is empty when the string returns 0)Mysql> Select ASCII (' 2 ');50Mysql> Select ASCII (2);50Mysql> Select ASCII (' dete ');100ORD (str)If the string str
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
-----------------------------------------------------------------------------
ASCII (str) returns the ASCII value of the first character of the string str (0 if str is an empty string) mysqlgt; selectASCII (
ASCII (str) returns the ASCII value of the first character of the string str (0 if str is an empty string) mysqlgt;
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
ASCII (str)Returns the ASCII value of the first character of the string 'str' (0 is returned when 'str' is an empty string)Mysql> selectASCII ('2 ');-> 50Mysql> select ASCII (2 );->50Mysql> select ASCII ('dete ');-> 100ORD (str)If the string 'str'
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.