Reputation: 675
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
Upvotes: 0
Views: 432
Reputation: 10551
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
Upvotes: 1