cancel
Showing results for 
Search instead for 
Did you mean: 

Number of week from Date fields (YYYY,MM,DD)

Former Member
0 Kudos
186

It will be much appreciated if anyone can help me on How to calculate no of weeks from a date field which has value like (20160318). I require the output like (201713) as the given date falls under 13th week of that year.

Accepted Solutions (0)

Answers (1)

Answers (1)

D039507
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Debjit,

try this:

SELECT ISOWEEK (TO_DATE('2017-10-12', 'YYYY-MM-DD')) "isoweek" FROM DUMMY;

returns the value 2017-W41

best regards

Thorsten