学习来源网站-bilibili
1.将字符串转变为日期
str_to_date(string,format_mask)
2.变化日期格式
date_format(date,format)
3.提取日期片段(年、月、周、日)
year(current_Date)...
4.时间平移
本月的第一天date_format(current_date,'%Y-%m-01') 第几天数字就改成对应的
本月的最后一天 last_ day(current_date)
往前推两天date_add(current_day,interval-2day)
往后推两天date_add(current_day,interval+2day)
上个月的今天date_ADD(CURRENT_dAY,INTERVAL-1MONTH)