Home > Database > Mysql Tutorial > body text

What is the use of from_unixtime function in MySQL

WBOY
Release: 2023-05-31 17:43:12
forward
1319 people have browsed it

from_unixtime(timestamp, format):

timestamp is int type time, such as 14290450779; format is the converted format, including the following format:

%M month Name (January...December)
%W Week name (Sunday...Saturday)
%D Day of the month with English prefix (1st, 2nd, 3rd, etc.)
%Y Year, Number, 4 digits
%y Year, number, 2 digits
%a Abbreviated name of the week (Sun...Sat)
%d Number of days in the month, number (00...31)
%e Number of days in the month, number (0...31)
%m Month, number (01...12)
%c Month, number (1...12)
%b Abbreviated month Name (Jan...Dec)
%j Days in the year (001...366)
%H Hours (00...23)
%k Hours (0...23)
%h hour (01……12)
%I hour (01……12)
%l hour (1……12)
%i minute, number (00……59)
%r time, 12 hours (hh:mm:ss [AP]M)
%T time, 24 hours (hh:mm:ss)
%S seconds (00......59)
%s Seconds (00……59)
%p AM or PM
%w Number of days in a week (0=Sunday……6=Saturday)
%U Week (0……52), here is Sunday Is the first day of the week
%u week (0......52), here Monday is the first day of the week

The above is the detailed content of What is the use of from_unixtime function in MySQL. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template