Avatar of Wilder1626
Flag for Canada

asked on 

Oracle - Query IW week number from Sunday till Saturday

Hi, I have below query where i pull data based on the Iso week number.

My problem is that a week starts on Monday till Sunday when i would like to pull from Sunday till Saturday.

How can i update my below query to do so?

Thanks for your help

SELECT User, crtd_dtt

             FROM User_Table

             WHERE (to_number(to_char( updt_dtt, 'iW')) = '16' and to_char(crtd_dtt, 'YYYY') = to_char(sysdate, 'YYYY')

             order by User ;

Open in new window

Below 2 first columns are the values and formats i can have in the table
table result
Oracle DatabaseSQL

Avatar of undefined
Last Comment
Alex [***Alex140181***]

8/22/2022 - Mon