troubleshooting Question

Oracle - Query IW week number from Sunday till Saturday

Avatar of Wilder1626
Wilder1626Flag for Canada asked on
Oracle DatabaseSQL
9 Comments1 Solution29 ViewsLast Modified:
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
Join our community to see this answer!
Unlock 1 Answer and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros