Zdobądź poniedziałek bieżącego tygodnia SQL
SELECT CURDATE() - INTERVAL WEEKDAY(CURDATE()) DAY AS startweek;
yusuf_fazeri
SELECT CURDATE() - INTERVAL WEEKDAY(CURDATE()) DAY AS startweek;
SELECT TO_CHAR(your_table.date_colunm, 'DAY')
FROM your_table;
SELECT
DATEADD(DAY, 2 - DATEPART(WEEKDAY, GETDATE()), CAST(GETDATE() AS DATE)) [Week_Start_Date],
DATEADD(DAY, 8 - DATEPART(WEEKDAY, GETDATE()), CAST(GETDATE() AS DATE)) [Week_End_Date]