Mysql time, string, timestamp, cross-turn

Source: Internet
Author: User

Time-to-round string
Select date_format (now (),'%y-%m-%d'); // 2018 - Geneva -  A
Time-to-time stamping
Select Unix_timestamp (now ()); // 1523504912
Time Stamp Turn time
Select From_unixtime (1523504912)//2018-12  One::
Timestamp to String
Select From_unixtime (1523504912,'%y-%d')//2018-   A
String Turn time
Select str_to_date ('2018-04-12','%y-%m-%d'); // 2018 - Geneva -  A

String Turn timestamp
Select Unix_timestamp ('2018-04-12'); // 1523462400
Schedule

The image to the network,%s,%i is not available.

Mysql time, string, timestamp, cross-turn

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.