当前位置:网站首页>Use Mysql to determine the day of the week
Use Mysql to determine the day of the week
2022-06-11 19:06:00 【Da Pangdong】
Will be today Thursday , That is to say 2020-07-02
1. Use dayofweek() Function conversion date

select DAYOFWEEK('2020-07-02')
2. Use DATE_FORMAT() Function conversion date

select DATE_FORMAT('2020-07-02')
3. Use WEEKDAY() Function conversion date 
select WEEKDAY('2020-07-02')

SELECT
CASE
DATE_FORMAT(NOW(),'%w')
WHEN 1 THEN ' Monday '
WHEN 2 THEN ' Tuesday '
WHEN 3 THEN ' week 3'
WHEN 4 THEN ' week 4'
WHEN 5 THEN ' Friday '
WHEN 6 THEN ' week 6'
WHEN 7 THEN ' Sunday '
END
as week
;
边栏推荐
- 视觉SLAM十四讲笔记-10-2
- Tips for using apipost
- 电子商务(njupt)
- 程序员10年巨变,一切都变了又好像没变...
- 求数据库设计毕业信息管理
- 2022-2023 MEM pre approval interview notice of School of management, Xi'an Jiaotong University
- 防止敌方坦克重叠
- Prevent enemy tanks from overlapping
- Internet_ Business Analysis Overview
- The US inflation rate reached a 41 year high of 8.6%! High inflation fever? The stock and encryption markets fell first!
猜你喜欢
![[signal denoising] signal denoising based on FFT and fir with matlab code](/img/4c/782afe2652a674d64fccd8d28304ed.png)
[signal denoising] signal denoising based on FFT and fir with matlab code

Flink CDC 在大健云仓的实践

手把手教你学会FIRST集和FOLLOW集!!!!吐血收藏!!保姆级讲解!!!
開發中必備的文件的上傳與下載

cf:D. Black and White Stripe【连续k个中最少的个数 + 滑动窗口】

【Multisim仿真】利用运算放大器产生方波、三角波发生器

leetcode:926. 将字符串翻转到单调递增【前缀和 + 模拟分析】

记录一下phpstudy配置php8.0和php8.1扩展redis

Programmers have changed dramatically in 10 years. Everything has changed, but it seems that nothing has changed

ASEMI的MOS管25N120在不同应用场景的表现
随机推荐
Practice of Flink CDC in Dajian cloud warehouse
Flink CDC 在大健云仓的实践
MySQL in-depth and complete learning - stage 1 - overview of learning
Cf:c. restoring the duration of tasks
Kubernetes binary installation (v1.20.15) (VIII) deploying network plug-ins
Dynamic explosion effect
First acquaintance with enterprise platform
On high availability architecture
ASEMI的MOS管24N50参数,24N50封装,24N50尺寸
防止敌方坦克重叠
KMP! You deserve it!!! Run directly!
WWDC22 开发者需要关注的重点内容
"Case sharing" based on am57x+ artix-7 FPGA development board - detailed explanation of Pru Development Manual
Function development of user information management
leetcode:66. add one-tenth
highcharts设置柱状图宽度、渐变、圆角、柱子上方数据
SAP BTP 上 workflow 和 Business Service 的 project 管理
Record the phpstudy configuration php8.0 and php8.1 extension redis
程序员10年巨变,一切都变了又好像没变...
【图像分割】基于马尔可夫随机场实现图像分割附matlab代码