-- Week start and end date for a given date
-- How to get first and last day of week in Oracle?
-- Get the week start date and week end date from week number in SQL ORACLE
SELECT TRUNC(SYSDATE, 'IW') -3 WEEK_START_DATE, -- I WANT MY WEEK START DATE WILL FRIDAY
TRUNC(SYSDATE, 'IW') +3 WEEK_END_DATE -- I WANT MY WEEK END DATE WILL THURSDAY
FROM DUAL;
-- How to get first and last day of week in Oracle?
-- Get the week start date and week end date from week number in SQL ORACLE
SELECT TRUNC(SYSDATE, 'IW') -3 WEEK_START_DATE, -- I WANT MY WEEK START DATE WILL FRIDAY
TRUNC(SYSDATE, 'IW') +3 WEEK_END_DATE -- I WANT MY WEEK END DATE WILL THURSDAY
FROM DUAL;
No comments:
Post a Comment