Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2013
    Posts
    30

    Unanswered: How to get week number from db2 using visual studio 2013

    Hello,

    I am using db2 with a date filed formatted as 20141110, which is November 10, 2014 in my sql query using Visual Studio 2013 I am trying to wonder how do I get the week number from the date field, which should be week 46. Any tips will be appreciated. Thank you in advance.

  2. #2
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    Hi,

    week_iso(to_date(20141110, 'YYYYMMDD'))
    or week (...) depending on when your week starts.
    Regards,
    Mark.

  3. #3
    Join Date
    Mar 2013
    Posts
    30
    Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •