Skip to Content
avatar image
Former Member

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

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 12, 2017 at 12:03 PM

    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

    Add comment
    10|10000 characters needed characters exceeded