Home > Database > Mysql Tutorial > body text

How to use DAYOFWEEK in MySQL

PHPz
Release: 2023-05-30 16:25:06
forward
1399 people have browsed it

DAYOFWEEK(date)

SELECT DAYOFWEEK(‘2016-01-16') 
SELECT DAYOFWEEK(‘2016-01-16 00:00:00')
Copy after login
-> 7 (表示返回日期date是星期几,记住:星期天=1,星期一=2, ... 星期六=7)
Copy after login

The above is the detailed content of How to use DAYOFWEEK 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