Answers for "mysql day of week"

SQL
2

mysql one week ago

select id from tbname

where date between date_sub(now(),INTERVAL 1 WEEK) and now();
Posted by: Guest on July-31-2020
3

mysql one week ago

SELECT sysdate() - 7; 				-- 1 week ago   12/01/2021 14:27:27
SELECT date(sysdate() - 7); 		-- 1 week ago   12/01/2021 00:00:00

SELECT * FROM my_table WHERE my_datecol > date(sysdate() - 7);
Posted by: Guest on May-09-2021
1

mysql date of the week

DAYOFWEEK(date)
Posted by: Guest on June-05-2020
0

mysql get day of week

DAYOFWEEK();//(1 for Sunday,2 for Monday …… 7 for Saturday )
Posted by: Guest on July-15-2019
-1

extract weekday from date in sql

SELECT WEEKDAY(date);
Posted by: Guest on June-15-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language