Mysql judges the date is the day of the week

Mysql judges the date is the day of the week

	SELECT
	CASE
			DATE_FORMAT(NOW(),'%w')
			WHEN 1 THEN '星期一' 
			WHEN 2 THEN '星期二' 
			WHEN 3 THEN '星期3' 
			WHEN 4 THEN '星期4' 
			WHEN 5 THEN '星期五' 
			WHEN 6 THEN '星期6' 
			WHEN 7 THEN '星期日' 
		END 
	as week;

Guess you like

Origin blog.csdn.net/weixin_45336946/article/details/127429951