No Weeks in Year

Can anybody help in Sql Statement for calculating no weeks in Current Month ,No of weeks in Given year
Cheers
satyanarayana reddy

Be aware that the IW element of the date format gives the ISO week number. This is subtly different from the WW element. Essentially:
- ISO weeks are always seven days long
- the ISO week 1 may start in the end of the previous year
- there may or may not be a week 53
- the last ISO week of the year may contain days from the next year.
whereas
- WW always has week 53
- WW week 53 is 1 or 2 days long
- WW week 1 always starts on 01-JAN
- WW weeks only ever contain days from the year in question.
...probably. The WW is subject to the vagaries of the NLS settings, so some of the above statements might vary in certain territories.
Cheers, APC

Similar Messages

  • Disconnected Slicer in PowerView - Hour | Day | Week | Month | Year | Max

    I want to create a Power View chart in Power BI with the Minute/Hour/Day/Week/Month/Year filters:
    Workbook can be downloaded at:https://www.dropbox.com/s/r00btg5zb8snohz/Disconnected%20Slicer%20Demo.xlsx?dl=0
    when MINUTE is selected the chart should display:
    Total Number of Msgs vs. X-axis showing the last 60 seconds (from current time) with 5 or 10 seconds interval.
    when Hour is selected the chart should display:
    Total Number of Msgs vs. X-axis showing the last 60 minutes (from current time) with 5 minutes interval.
    ex: 10:00AM 10:05AM 10:10AM ...................................11:00AM
    when DAY is selected the chart should display:
    Total Number of Msgs vs. X-axis showing last 24 hours (12AM to 11:59PM with 1 hour interval)
    when WEEK is selected the chart should display:
    Total Number of Msgs vs. X-axis showing the last 7 days from current datetime stamp with 1 day interval.
    when MONTH is selected the chart should display:
    Total Number of Msgs vs. X-axis showing the 30 days from current datetime stamp with 1 day interval
    when YEAR is selected the chart should display:
    Total Number of Msgs vs. X-axis showing the last 12 months from current day with 1 month interval
    It would be great if the PowerView chart can be made to look something like this:
    shown in the below link:
    When '5 Day' is selected the values in the Y axis and X axis change automatically.
    Here's the link:
    https://www.google.co.in/search?&biw=1600&bih=799&sclient=psy-ab&q=google+share+price&oq=google+share+price&gs_l=serp.3..0l4.148.192.3.270.2.0.0.2.2.0.0.0..0.0.msedr...0...1c.1.60.serp..0.2.11.Jf8jXyUgmDA&pbx=1&bav=on.2,or.r_qf.&bvm=bv.82001339,d.dGY&ech=1&psi=qcGPVJmeJoHGmQXsooDACQ.1418707370733.9&ei=nsOPVJGiI6GgmQW0g4LABA&emsg=NCSR&noj=1
    for more clarifications and information please feel free to reach out to me at [email protected]
    www.twitter.com/mph88

    Hi Manjunath,
    Currently looking into a possible solution although some of the limitations within Power View restrict how close we can get to the ideal result. Still exploring some approaches :)
    Regards,
    Michael Amadi
    Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to vote it as helpful :)
    Website: http://www.nimblelearn.com, Twitter:
    @nimblelearn

  • How to calculate Number of weeks in Year ?? urgent

    hi gurus,
    i have to calculate the number of weeks in year. could you please suggest me is there any function module for that or do we need to create variable to get the number of weeks?
    regards

    Get some pointers frm
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/help-on-function-day_get_week-1067350
    Re: printing calender
    Calculating the number of days of a year including leap year
    Re: How to calculate No.of Weeks?

  • Can a weekly fiscal year variant have different number of posting periods?

    Hi Friends,
    Our demand planning team needs a weekly fiscal year variant (X) that will be assigned to all material master data.  X is year dependent and needs to be consistent with our fiscail year variant Y which is assigned to all company codes.
    I input "52" as number of posting periods for X, but the problem is: every 6 years, there is an additional week in this fiscal year. 
    This means, the number of posting period is also year dependent.  Although most of fiscal years have 52 posting periods, some will have 53 posting periods instead. 
    I cannot create another fiscal year variant Z just for these 53 posting periods, because the material master data is not year dependent, I can only assign either Y or Z.
    Have you ever encountered this situation?  If so, could you please share your solution?
    Thanks,
    Jennifer

    You can always have 53 period year independent fiscal year variant as explained below.
    We have 365 days in normal year, and 366 days in leaf year(comes every 4 years).
    In leaf year you will get 8 days in period 9 and 1 day in period 53.
    In normal years all periods 7 days and 1 day in period 53
    Month       Day       Period
    1                    7             1
    1                   14            2
    1                   21            3
    2                   25            8
    3                   4              9
    12                 23           51
    12                 30           52
    12                 31           53
    You can have the same Fiscal year variant always.
    Hope this will workout for you
    Prasad
    Edited by: Prasad Yarra on Nov 5, 2009 10:17 PM
    Edited by: Prasad Yarra on Nov 5, 2009 10:54 PM

  • Any Function Module to get date by passing week and year

    Hi,
       Is there any Function Module available to get date by passing week and year. For example, Week 24, Year 2005 and you get the date.
    Regards,
    Mira

    WEEK_GET_FIRST_DAY
    pass 'YYYYWW' (200524) to WEEK parameter it will give you the week start date
    Raja

  • BEx: Compare Week current year vs. prev. year

    Hello,
    In BI7.0 I have to create a report with following design:
    Budget 2009:
    Week 01.2009 : 50
    Week 02.2009: 60
    Week 03.2009: 70
    Budget 2008:
    Week 01.2008: 30
    Week 02.2008: 35
    Week 03.2008: 40
    The report shout display on rows level: 01  /   02   /   03  and so on (WITHOUT year).
    The target is to compare on weeks level the budget for the different years.
    Any idea?

    Hi,
    U can keep calweek in rows, then year and the budget keyfigure in columns.Place the year(probably 0calyear) above the keyfigure structure in column.
    As for displaying week with year create a text variable on the calweek(which is in rows) displaywhich shall be a customer exit and return the week part alone(from customer exit).
    Hope it helps.
    Regards,
    Rathy

  • Java.util.Formatter format string for week of year?

    What is strange in the Formatter API, regarding dates, is that there is no format string to display week of year. To display day of year e.g. you can use:
    String.format(�%tj�),Calendar.getInstance())but what is the string for week of year?
    String.format(�%tw�),Calendar.getInstance())doesn�t work.
    Any ideas, or did I overlooked the API?

    I �m using
    String.format(�%tx�),Calendar.getInstance())everywhere in my code where x is any of the other (e.g. j, d etc.). Why use different way for this? How come Sun did�t add e.g. a w in the API to display the week of year as it does for day of year?

  • Provide Logic for Day,week,month,year..

    Hi Experts,
    My Requirement is as follows...
    The field is for plant maintenance cycle in days/weeks/months/yrs. The table shows it as a floting number for MMPT-ZYKL1.
    But the transaction IP02 shows this field as a numeric field. There is some background method  being done on this field before display.Can i have the logic for Day,week,month,year..
    Could any one please provide logic for this...............will appreciated..
    Thanks ,
    vamsilakshman.p

    Hi..
    try below code.
      CALL FUNCTION 'FLTP_CHAR_CONVERSION_FROM_SI'
    EXPORTING
    char_unit       = <W_MMPT-ZYKL1>
    decimals        = 0
    exponent        = 0
    fltp_value_si   = <W_MMPT-ZEIEH >
    indicator_value = ‘X’
    masc_symbol     = ' '
    IMPORTING
    char_value      = <res__number_days>.
    regards.
    laxman

  • HT4914 How long is the $24.99 subscription period for iTunes Match, nowhere does it show the time period?  Week, month year?

    How long is the $24.99 subscription period for iTunes Match, nowhere does it show the time period?  Week, month year?

    It's an annual amount - it's at the top of that page :
    iTunes Match requires an annual subscription fee of $24.99

  • First day of week of given "week of year"

    Hi
    I have two values:
    - the year, for example 2007
    and
    - the week of year, for example 32
    Now i want to find out the first day of this week, which is in our locale (Switzerland) Monday, the 6th august 2007.
    How to do it?
    Thanks, Michael

    Have a look at java.util.Calendar.

  • Function Modules to get First day of week, month, Year

    Can anyone name the Function Modules for getting First day of week, month ,year.

    to get first day of week use this function;   WEEK_GET_FIRST_DAY
          CALL FUNCTION 'WEEK_GET_FIRST_DAY'
               EXPORTING
                    WEEK         = '201107'
               IMPORTING
                    DATE         = l_date
               EXCEPTIONS
                    WEEK_INVALID = 1
                    OTHERS       = 2.
    with DATE_COMPUTE_DAY function you can get date number in week.
    CALL FUNCTION 'DATE_COMPUTE_DAY'
           EXPORTING
                DATE = workdate
           IMPORTING
                DAY  = day_of_week_num
           EXCEPTIONS
                OTHERS  = 8.
      CASE day_of_week_num.
        WHEN 1.
          hold_day_of_week = 'Monday'.
        WHEN 2.
          hold_day_of_week = 'Tuesday'.
        WHEN 3.
          hold_day_of_week = 'Wednesday'.
        WHEN 4.
          hold_day_of_week = 'Thursday'.
        WHEN 5.
          hold_day_of_week = 'Friday'.
        WHEN 6.
          hold_day_of_week = 'Saturday'.
        WHEN 7.
          hold_day_of_week = 'Sunday'.
        WHEN OTHERS.
          hold_day_of_week = 'invalid'.
      ENDCASE.

  • Weeks numbers (year view)

    Yosemite, Calendar:
    In the year view the week numbers are completely wrong? But in day, week and month are ok.
    How could I see the correct numbers in the year view, please?
    Regards

    there is unfortunately no year view available in ical at the moment.
    may i suggest you send your suggestions to apple: http://www.apple.com/feedback/ical.html

  • Creating a fiscal date table that includes Day of Year and Week of Year column

    Hi,
    Our fiscal year runs between 1st October through to 30th September and I'm trying to create a date table that I can use to represent this in Powerpivot (I'm using Excel 2013). I had no probably creating columns for Fiscal month or fiscal year, however I am
    having issue breaking it down more than that, specifically I cannot work out how to calculate:
    - day of the year
    - week of the year (with week one starting on the first day of the year rather than the first Monday)
    I worked out how to do the day of the year until I had to try and account for leap years which broke the formula I had! Can anyone please recommend solutions, I cannot see anything online about this. Obviously I know that it is simple to do this for a normal
    calendar year but this approach doesn't work with a custom fiscal year.
    Whilst it is useful for several reasons, my main reason for wanting week is so that I can plot my Pivotcharts more smoothly (although I may have missed an easier way to do that).
    Thanks,
    James

    For my example I started with 1 column in Power Pivot called [Date]
    I created the following Columns
    [DayofMonth] =Day([Date])
    [MonthNumber] =Month([Date])
    [Fiscal Year] =IF([MonthNumber]< 10, Year([Date]), (Year([Date])+1))
    [Fiscal Day] =[Date] - DATE(([Fiscal Year] -1), 10,1) +1
    [Fiscal Week] =RoundUp([Fiscal Day] / 7, 0)
    Change [Date] to whatever your date column is and those DAX formulas will get you what you need

  • Report by Day/Week/Month/Year

    Hi All,
    I have the table showing below
    Empid     name     tikcetno     Completed date
    694     anil     10051     23-Jun-09
    695     madhu     10052     23-Jun-09
    694     anil     10053     23-Jun-09
    695     madhu     10054     22-Jun-09
    695     madhu     10055     6-Jan-09
    I need to create the report which will show employee wise count of tickets in a day,week,month and year.                  
    Day: count(tickets) for current date
    Week: count(tickets) for current week
    Month: count(tickets) for current month
    Year: count(tickets) for current year
    I need to show all these four columns in a horizantal table. I am using crystal reports2008. Please help me. ur help would be appreciated.
    Anil.

    Hi,
    create 4 formulas for day, week, Month and year
    for ex, in Day formula
    IF Date Field = CurrentDate then 1 else 0... similarly for other ranges. Create a Group based on employee, and insert a SUM  summary field of these formulas in Group header.
    Hope this will help you.
    Jyothi
    Edited by: Jyothi Yepuri on Jul 13, 2009 3:04 AM

  • Daily, Weekly, Monthly, Yearly Backups & Tapes Pooling

    We are running number of servers, and have recently migrated from HP Data Protector to System Center DPM 2012 SP1. I am facing two issues here in which the potential solution is requested. I have created one Protection Group with 1 week retention for Daily
    Backup. Different selections or sources are part of this protection group from different servers.
    1. The issue # 1, is that when I wanted to create more Protection Groups for Weekly, Monthly and Yearly Tape Backups, then I could not select those volumes which are already part of Protection Group that I created for the Daily Backup (probably due to the
    reason that same data source can't be part of multiple protection groups). The data source selection will repeat in all protection groups, so please advise how can I achieve daily, weekly, monthly and yearly backups?
    2. Can I restrict some specific tapes (by allocating through bar codes) to each protection group so that only specific tapes will be used for daily, weekly, monthly and yearly backup? This way the offsite tape movement will also be achieved.
    Need solution on both issues. Please help.

    Hi,
    For item 1. use following PG settings. 
    1) In the protection group, select short term tape and long term protection.
    2) Select daily, only full backup, or Full plus incremental based on your needs.
    3) For the long term goals, select weekly, monthly, and yearly.
    For item 2. - there is no provision in DPM to specify certain tapes for each goal, but if you create a colocation PGset, you can specify how long to write to a tape and control if different goals use the same tapes or not by adjusting expiry tolerance.
    See Colocate data from different protection groups on tape
    http://technet.microsoft.com/en-us/library/jj628040.aspx
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT]
    This posting is provided "AS IS" with no warranties, and confers no rights.

Maybe you are looking for

  • Content Header Portlet - Subportal

    I have made a very simple Content Server Header Portlet with the word "Test". Then set the stylesheet to another color other than the default. After setting the neader for that subportal, I tested it. It works, shows the new color scheme for jsut tha

  • Time Machine Error sparse bundle could not be accessed

    Issue: Time Machine Error "the backup disk image "/volumes/data/.sparsebundle" could not be accessed (error -1). Background: I have an '07 iMac with an external WD 1TB hard drive to store video, pictures and music as well as a 1TB Time Capsule to use

  • MacBook Pro Maverick and creative suite CS5

    I bougth a new MacBook Pro with Maverick, but my creative suite CS5 does not work on it. What to do?

  • Acquiring Images using the USB port

    I want to acquire Images using the USB port of the PC. Is it possible to acquire images using the USB port and analyze the image using IMAQ library. If we use the USB port direct then we may not need the IMAQ vision acquisition card.

  • How to enable Google Mail on the N9

    So I want to turn on the Mail application with my google account. I click on the create account, select google, add my credentials and it says it's being successful. I can turn on google talk and it works without issues. However, the Mail app just co