Skip to Content
0

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

Oct 12, 2017 at 09:57 AM

56

avatar image
Former Member

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member
Oct 12, 2017 at 12:03 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded