SELECT TO_CHAR(SYSDATE,'YYYYWW') START_wEEK
from DUAL;
--202409
-- Query extracting from 27Feb2024 Tuesday (Today)
SELECT TO_CHAR(SYSDATE-2,'YYYYWW') START_wEEK
from DUAL;
--202408
-- Query extracting from 25Feb2024 Sunday with sysdate -2
Both the queries should return 202409 which represents 9th week in the year. And it should consider Sunday to Saturday format, Sunday being the week start.
Please give me the right query.