The difference between MySQL Date_format from_unixtime

Source: Internet
Author: User
Tags month name

Date_format: Time function for formatting MySQL date,datetime,timestamp, Times, Year

From_unixtime: You can use this function to convert if the field type that holds the timestamp is int or another type, such as: From_unixtime (Create_time, '%y-%m-%d%h:%i:%s ')

Non-time Type field insertion uses the current timestamp Unix_timestamp (now ())

The conversion format is as follows:

Format Description%a abbreviated week name%b abbreviated month name%C Month, value%D Day of the month with English prefixes%Day of the D-month, value (xx- to)%E-month of the day, value (0- to)%F microseconds%H Hours (xx- at)%H Hours ( on- A)%I-Hour ( on- A)%I minute, value (xx- -)%Day of the J-year (001-366)%K Hours (0- at)%L Hours (1- A)%M Month name%M-month, value (xx- A)%p AM or PM%R time, A-hours (hh:mm:ss AM or PM)%s seconds (xx- -)%s seconds (xx- -)%T time, --hours (HH:MM:SS)%U Week (xx- -Sunday is the first day of the week%U Week (xx- -Monday is the first day of the week%V Week ( on- -Sunday was the first day of the week, with%X Use%V Week ( on- -Monday was the first day of the week, with%x Use%W Week name%W weeks of the day (0=Sunday6=Saturday)%X years, of which Sunday is the first day of the week,4Bit, with%V Use%X years, of which Monday is the first day of the week,4Bit, with%v Use%Y years,4bit%Y years,2-bit

The difference between MySQL Date_format from_unixtime

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.