I am trying to find the weekday for Sunday to Saturday. In oracle by default Monday is the first day of the week. So When I calculate weekday with following query
Select to_char(sysdate, 'D') from dual
as today is 09/12/2022 this is giving me result as 5
as week start from Monday. I want this should be calculated as week start from Sunday. Ideally, answer should be 6
if this week start from Sunday.
Is there any easy way to do it, I can use case statement, but that is not a good way. Please help.
Talk to your DBA to fix territory. If it was set to e.g. India, then you wouldn't have to calculate anything: