First day Of this week and last week

后端 未结 3 1308
梦毁少年i
梦毁少年i 2021-02-06 16:42

I am currently getting first day Of this week and last week values with vbscript function in 2/12/2009 format. I was wondering if it was possible with SQL query.

3条回答
  •  遇见更好的自我
    2021-02-06 17:44

    Get the first day of current week.
    for extra information use this link.

    http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_dayofweek

    select date(curdate()-DAYOFWEEK(curdate()-1)) as dat;
    

提交回复
热议问题