0

I have a query in the postgres : select date_part('week', CURRENT_DATE) The outcome of this query is 36.

I need to convert the same postgres query into Oracle . How do I do this ? I tried the below query but I am getting an outcome as 5. select to_number(to_char(CURRENT_DATE,'Week'))FROM DUAL

1 Answer 1

1

Have a look at the Oracle date formats:

http://docs.oracle.com/cd/B28359_01/server.111/b28286/sql_elements004.htm#i34924

select to_char(current_date,'IW') from dual
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks mate! Will check this out !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.