No of days elapsed for a given month

Hello,
I am trying to find number of days elased for a given month. How do I write this in CMOD.
My input variable is CALMonth/Year  - 06/2010. If I run the report today, I should get numbers of days up to today. Please advise.
thanks for your help in advance.
AG..

Following thread might help you with this
No. of days in a month

Similar Messages

  • Day wise Closing stocks for the given month

    Hi,
    Please suggest me your valuable ideas for Closing Stocks Calender day wise for the given month.
    Ex : User Input 03.2013 , now report has to show daywise closing stock like below
                                            01.03.2013    140 MT
                                             02.03.2013     150 MT
                                              31.03.2013    230 MT.

    I like recursive with clause B-)
    with rec(StaV) as(
    select extract(day from date '2011-01-01')
      from dual
    union all
    select StaV+1
      from rec
    where StaV+1 <= extract(day from last_day(date '2011-01-01')))
    select ListAgg('''' || to_char(StaV) || '''',' ')
           within group(order by StaV) as days
    from rec;
    DAYS
    '1' '2' '3' '4' '5' '6' '7' '8' '9' '10' '11' '12' '13' '14' '15' '16' '17' '18' '19' '20' '21' '22' '23' '24' '25' '26' '27' '28' '29' '30' '31'

  • Calculate Avg  for the given months based on the no. of days in months

    Dear Experts
    I  have a report in which there is a characterictic claenderyr/month.The Input paramter is claenderyr/month which is restricted by a variable of type interval. i mean user will enter calenderyr/month as interval say 012010 to 06.2010. Now I have to calculate Avg sale Qty for the given months based on the no. of days for the given range of months. How I can achieve this in BW Query. Pl. advice
    Dinesh Sharma

    Hi,
    Create formula for the sales qty.
    maintain the exception aggregation as average based on calday
    Best Regards,
    M.H.REDDY

  • TO GET WEEKS for a given MONTH AND YEAR

    Is there any FM to get the no of weeks for a given month, say 01 2005.
    Can i get the week numbers say 1 2 3 4 5 for the given month and year.
    Please let me know.
    Happy Holidays.
    Regards,
    Manohar E

    Hi Manohar,
       Use FM DATE_GET_WEEK twice; first time pass first day of the month and again pass the last day of the month as a parameter. So u will be having week number(yyyyxx) for the first week of the month and week number for the last week of the month. From these two, in between week numbers u can easily fetch. I hope this will help u out.
    Regards,
    Kavya Shah

  • Looking for formula to fill dates of particular days of week for a given month

    Hi
    I have a Numbers document with a sheet for each month of the year, named "January", "February", "March", etc.
    Each sheet contains a table as follows:
    I am looking for a function that will calculate the dates in a given month that I am due to see each client, based on the year (contained in a single cell table on a seperate sheet) and the month of the sheet (I am presuming that a function can refer to the name of a sheet).  These dates would populate the cells under "Session 1", "Session 2", etc. (for some days of the week there may be only four sessions, for others five).
    I hope this is clear, and would be grateful for any help in getting this working.
    Thanks,
    Nick

    Here's an example, using September, 2011 as the month.
    Main Table:
    A1: =DATE(Year :: A2,9,1)
    This calculates the Date and Time value for midnight at the beginning of the first day of the ninth month of the year indicated in cell A2 of the table "Year" (September 1, 2011). It uses a Custom format to display only the month and year of this date. The Dates calculated in the rest of the table depend on the Date and Time value in this cell.
    A2 - A11: Entered data. Not used in calculations.
    B2 - B10: Entered data. The text values here are used as search-for values, and must match the text values in column A of the table Weekday lookup.
    C2, Filled down to C10: =$A$1+MOD(7-WEEKDAY($A$1)+VLOOKUP(B,Weekday lookup :: $A:$B,2,FALSE),7)
    This calculates the Date corresponding to the first occurrence of the weekday indicated in B during the month in A1. The result is a Date and Time value (used in formulas to the right). The cells use a custom format to display only the Day (of the month) number.
    D2, Filled right to column F and down to row 10: =C+7
    Calculates the date seven days after the date in column C.
    G2, filled down to row 10: =IF(MONTH($A$1)=MONTH(F+7),F+7,"")
    This is the same formula as used in D2, but adds a check to suppress the calculation if the result is not in the same month as other dates on the table.
    Year: The requested single cell table to record the year.
    Weekday Lookup: A lookup table from which to retrieve the weekday number for the day in column B of the main table.
    Custom formats:
    Select cells C2 - G10
    Open the Inspector > Cell Format Inspector > Date and Time
    Delete the unwanted elements from the workspace in the Inspector.
    Repeat for cell A1.
    Regards,
    Barry
    PS: Numbers cannot use the Sheet name or Table name as data for a formula unless the name is placed into a cell on a table.
    B

  • How to get period date of for a given month from a given date in mdx for SSRS report (mm/dd/yyyy)

    I have a situation,  where i need to write expression Period to date(PTD). i want to know how to get the period date. i want you to help in writing Period date or else is there any function to get period date for a given date(the  date is given
    from the parameter dynamically) in MDX for SSRS report
    ram

    Hi ram,
    Per my understanding that you want to get the period date based on the month selected and the given date, right?
    Could you please provide details information below to help us better understanding your requirements, thus we will be more effective to provide an solution:
    What is the format of the period date you want to get, is this date in the DB and you want to filter it based on the month and the given Date?
    Did the month and given date are two parameters in the report? if possible, could you please provide some sample data in the DB and also the snapshot of the report structure
    I assume you want to get the period date(mm/dd/yyy) between the select month(e.g:Feb) and the given date (10/1/2014) and you should get the date between(02/01/2014-10/1/2014).
    If so,and you also have two parameter "Month","EndDate"(EndDate is the given date), please reference to details information below:
    You can create an new parameter "BeginDate" (Date/Time) which is the begin date of the period, you can use the expression to get the value based on the value of the month and the year value from the given date,finally hide this parameter:
    Specify the available value:
    Label:=Parameters!Month.Value &"/01/"& DatePart("yyyy",Parameters!EndDate.Value)
    Value:=CDate(=Parameters!Month.Value &"/01/"& DatePart("yyyy",Parameters!EndDate.Value))
    Specify the default Value:
    Value:=CDate(=Parameters!Month.Value &"/01/"& DatePart("yyyy",Parameters!EndDate.Value))
    Add filter to the dataset as below:
    Preview you will get all the date in the given Period:
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu

  • How to calculate the number of days worked for a given period

    I need to calculate the number of days worked by contractor employees for a time period to be entered by a user. I am building a query on an infoset which contains employee information including contract start date and contract end date for the employee.
    Ideally I'd like the user to enter the time period which should be reported on e.g. 01.08.2009 to 31.08.2009
    The report should then identify all the contractor employees which were working during this period and to work out how many days they worked during this period. Obviously the contract start and end dates could fall both inside and outside the reporting period.
    Can this be done and if so, do you have any suggestions as to how to do it?
    Thanks.

    hi
    So here you will first have to load the master data table employee in one internal table and read this table with the variables entries.
    Your code in the reporting exit should look like that.
    bye
    data : wa_employee type /bi0/pemployee.
    When 'ZDATE1'
    if i_step = 2.
    LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZDATE2'.
    clear l_s_range.
    clear wa_employee
    1- select the entries from table employees
    select single employee dateto datefrom
    from /bi0/pemployee
    into corresponding fields of wa_employee
    where dateto le loc_var_range-low
    and datefrom ge loc_var_range-high.
    if sy-subrc eq 0.
    CALL FUNCTION 'FIMA_DAYS_BETWEEN_TWO_DATES'
       EXPORTING
           i_datum_von  = wa_employee-datefrom
           i_kz_ult_von = 'X'
           i_datum_bis  = wa_employee-dateto
           i_kz_ult_bis = 'X'
           i_szbmeth    = '1'
       IMPORTING
          e_tage       = no_days.
           l_s_range-low  = no_days.
           l_s_range-sign = 'I'.
           l_s_range-opt  = 'EQ'.
          APPEND l_s_range TO e_t_range.
              ENDIF.
            ENDIF.
    endloop.
    ENDIF.
    Boujema

  • How to create view on dates for a given month for matrix

    hi all
    i have the following 2 tables
    Task_Master
    Task_ID
    Task_Name
    Task_Details
    Task_ID
    Task_Date
    Task_Count
    Both the tables are linked through primary and foreign keys...just want to create a view where i will provide only month and it will return the days like 1-Oct....2-Oct....3-Oct....4-Oct.....5-Oct.... and the Task_Count value under it ..INPUT IS AS FOLLOWS
    01/01/2010 How many ATM's issued Today 20
    01/02/2010 How many cheque books issued Today 50
    01/03/2010 How many cross cheques Today 50
    Result required
    Task.....................1-Jan..........2-Jan..........3-Jan.........4-Jan........31-Jan
    Atms Issued ..........20..............20..............10..............50..............1
    Chequebooks.........34..............56................67.............0................67

    Hi,
    That's called a Pivot , and here's one way to do it:
    WITH     start_date     AS
         SELECT     TO_DATE ( '01-Jan-2010'
                   , 'DD-Mon-YYYY'
                   )     AS start_date
         FROM     dual
    SELECT       m.task_name
    ,       SUM (CASE WHEN TO_CHAR (d.task_date, 'DD') = '01' THEN 1 END)     AS Day_1
    ,       SUM (CASE WHEN TO_CHAR (d.task_date, 'DD') = '02' THEN 1 END)     AS Day_2
    ,       SUM (CASE WHEN TO_CHAR (d.task_date, 'DD') = '03' THEN 1 END)     AS Day_3
    ,       SUM (CASE WHEN TO_CHAR (d.task_date, 'DD') = '31' THEN 1 END)     AS Day_31
    FROM       task_master     m
    JOIN       task_detail     d     ON     m.task_id     = d.task_id
    JOIN       start_date     s     ON     d.task_date     >=            s.start_date
                        AND     d.task_date     < ADD_MONTHS (s.start_date, 1)
    GROUP BY  m.task_name
    ;As posted, this woirks is Oracle 9 (and up).
    Starting in Oracle 11, you can also use the SELECT ... PIVOT feature, which is better.

  • Return date for a given week number in a month

    Hi,
    Can someone urgently post a snippet code that will return the date if the week number and the weekday (like wednesday) for a given month in an year is passed.
    ex: If I say 2nd wednesday of August in 2004 , it must return the date for second wednesday. URGENT

    Don't flag your question as urgent, even if it is for you. Claiming urgency is very likely to be counter-productive: most forum regulars will simply ignore such messages as rude and selfish attempts to elicit immediate and special attention.
    Besides, unless the Symbionese Liberation Army is about to chase you over the edge of a cliff, your problem probably isn't as urgent as you think. :o)

  • The glass on my new ipad air was broken one day. I have had it for about a month. 1 day I took it out of its case as usual and the screen was splintered at the top and cracked downwards.  It had not received any bangs, or been dropped or anything.  Help!

    Hi, I have had my ipad air for about a month.  The other day I took it out of its cover and it was splintered from the top with downward cracks.  It is new and under warranty so I rang the support team.  They told me that it would cost about €120 but could be repaired on the spot and they made me an appointment at the local genius bar.  I got there and they told me that I had dropped it or banged it or something.  I said I had not, they insisted that I must have done.  I repeated several times that I had not - it was obvious they did not believe me, they said I must have done.  They then told me they never repaired or replaced broken glass in any ipads, that the man on the 'Support' had been wrong.  They always replaced the whole ipad at a cost of €300.  I was devastated at not being believed and at the amount of money they were asking for.  I left and rang the support again.  I was told their system was down but to call on monday to get a quote for the reparation, I could send it to my home insurance company and they would undoubtedly cover the repair.  I asked how long this was all going to take because, I was in the middle of a big project and this was taking up my time, and also I needed the ipad for my work.  They told me it would be done in a minute.  I rang on the Monday and I was told it would take up to 5 days to send but probably it would arrive sooner (it is now thursday, I have received nothing).  I then rang my household insurance, a big company - and they told me they had never heard of such a cover.  I asked if this was because I had a very basic policy, they said, no it wasn't that - I didn't have a basic policy I had quite thorough policy, but they didn't know of a policy in any comany that would cover this sort of damage.  I was stunned - yet again I had been given false information and false hope by apple.  Yet again I was let down.  I then decided to do a further investigation on the internet and discovered a long trail of comments on Apple Forum of people who have also had splintering and cracking of the ipad air glass for no reason whatsoever.  Some have commented that the glass could be thinner in order to reduce the weight, some have said that the splintering could be caused by a weakness in the casing at the top where it is plastic (the ones that take sims) that might make it more flexible and therefore liable to crack.
    All of the posts and complaints on the apple forum and elsewhere seem to point to a design fault.  However throughout all this I have been mislead by apple support staff constantly who all say different things, I have virtually been accused of lying by denying that my ipad received any kind of impact by apple staff and I have been left feeling incredibly frustrated and upset by the total lack of any kind of real help by Apple.  All this despite being acomplet apple user in my business for the last 25 years, where I have never come across this attitude towards me as a customer before.
    When the screen on my iphone broke, it was because I fell in the street while I was talking on the telephone, it flew out of my hand and smashed on the pavement.  I was rolling around in agony, while my son was holding up the smashed telephone wailing 'Mama, you've smashed your iphone!!!'  This of course, I blamed on noone but myself - it broke because it fell, I paid an arm and a leg without protest to get it repaired.
    This is not the case with my new ipad air.  It has splintered for no good reason at all - and noone at Apple seems to want to help me or to care!
    I would really appreciate it if someone could tell me if there is anything else I can do to ge this matter resolved?

    If it was a refurb replacing one that was under warranty, the warrany is good until the original warranty expires or 90 days from replacement, whichever is longer. In either event, it should still be covered if you've only had it for a month. (assuming you're in the US here). You can try to restore it as a NEW device rather than restoring from your backup, but this sounds like a hardware failure... I think. I'm not sure what you mean by "the top half of the screen slides". If you mean only the top half is touch sensitive, how can you determine that? You wouldn't be able to slide to unlock if that were the case...
    Sorry, I'm a little confused by that description.

  • Batch wise stock for a given period or month

    Hi,
    My company wants to implement stock ageing report in MM.
    We manage the stocks in Batches. For us the main criteria for stock ageing is batch creation date.
    The report should run stock ageing based upon the date range given as an input screen
    For ex : date range in input can be of today or as of 30.06.2010.
    If the report is run as of today then I am able to get the batch stock from table MCHB . Quantity from field "CLABS"  and the batch creation date from the field "ERSDA"
    But if the report to be run as of 30-06-2010. Then I am not able to get the data from MCHBH as of 30.06.2010.
    I have checked for one material in the table and as per stock it should be 351 as of 30-06-2010 but in the MCHBH table for the month 06. year 2010 it is showing as 136 pcs only.
    As our LIS tables are not getting populated correctly I am not able to check those tables too.
    Can any one guide me with the logic or the table where I can get the batch stocks for a particular month.
    I need Material, Batch, Quantity month and year .
    Please advice how can i get the data and from which table.
    Thanks you for your support in advance.
    Regards
    Fazal

    Hi Jurgen,
    Thanks for your reply. I am not looking for any analysis report or LIS report.
    i am looking for simple ageing report for a date entered by the user. I got the logic and tables for the current date but if i need to refer the stock ageing of previous date like my stock ageing at 30-06-2010. I am not able to get any tables where i can have the batch stock for a given date or a month.
    The report output format to be
    stock <=30 days
    stock>30 and <=90
    stock>90 and <=180
    stock>180 days
    The criteria for calculation will be the date entered by the user in the input screen. If the user enters the date as 30-06-2010 then all the stock received in the month of june and still lying in my storage location will fall the category <=30 and display in the report.
    Stocks received in the month of march, april and may will fall under the category "stock >30 and <=90".
    If I can get the batch wise stock for a particular month , I can pick the posting date of the Goods receipt from the batch number and calcuate my ageing (i.e date entered in the input scren of the report 30-06-2010 - batch posting date).
    I am also referring to the note which you have sent but in the mean while if you can help me to identify the tables where I can get the batch stock for a particular month.
    Thanks
    Fazal.

  • How do you set repeat events for a given day of the week

    How do you set a repeat event in calender for a given day of the month.  Expample 3rd Wednesday each month?

    Have you read the app store guidelines yet?
    App Store Review Guidelines:
    http://developer.apple.com/appstore/resources/approval/guidelines.html
    Don't go on what you've seen in the store - for every example you spot, there are hundreds that didn't make it in.
    As well, Apple is tightening up on reviews, etc.
    Loads of discussion on this in the iOS Dev Forums, BTW

  • SSAS Tabular - return number of days in given month using month's start date?

    Is there a way to return the number of days in a month by providing just the month date or month start date?
    We have a time table, but it is at monthly (not daily) granularity.
    So I can't just count rows between start/end of month.
    I need to be able to divide by the number of days in a given month and can't seem to find a way to get number of days in that given month.
    Thanks!

    Hi,
    According to your description, you want to get the number of days in a month with the month's start date, right?
    In this case, we can get the first day of next month using DateAdd function, and then use DateDiff function to calculate the number of days in this month. Here is a sample query for your reference.
    WITH
    MEMBER Measures.Today AS vba!Now()
    member measures.FirstDayOfNextMonth as dateadd("m",1,Measures.Today)
    member measures.daysnumber as datediff("d",Measures.Today,measures.FirstDayOfNextMonth)
    select Measures.daysnumber on 0
    from
    [Adventure Works]
    Reference
    http://msdn.microsoft.com/en-us/library/hh510163.aspx
    http://office.microsoft.com/client/helppreview14.aspx?AssetId=HV080007558&lcid=1033&NS=EXCEL%2EDEV&Version=14&tl=2&pid=CH080007543
    http://office.microsoft.com/client/helppreview14.aspx?AssetId=HV080007559&lcid=1033&NS=EXCEL%2EDEV&Version=14&tl=2&pid=CH080007543
    Regards,
    Charlie Liao
    TechNet Community Support

  • Find the 'DAY' for a given 'DATE'

    Hi Folks,
    I need a help regarding finding the day for a given date.
    My requirement is that..,
             If I enter a date using 'parameters', it should write the 'day' for the corresponding date.
    To be more specific.....,
    if I enter date as ' 07/15/2008 ' it should return me  the day as 'Tuesday'.
    Regards,
    Naveen G

    HI,
    FM LIST WITH RESPECT TO DAY, WEEK, AND MONTH.
    CALCULATE_DATE : Calculates the future date based on the input .
    DATE_TO_DAY : Returns the Day for the entered date.
    DATE_COMPUTE_DAY : Returns weekday for a date
    DATE_GET_WEEK : Returns week for a date
    RP_CALC_DATE_IN_INTERVAL : Add days / months to a date
    MONTHS_BETWEEN_TWO_DATES : To get the number of months between the two dates.
    END_OF_MONTH_DETERMINE_2 : Determines the End of a Month.
    HR_HK_DIFF_BT_2_DATES : Find the difference between two dates in years, months and days.
    FIMA_DAYS_AND_MONTHS_AND_YEARS : Find the difference between two dates in years, months and days.
    MONTH_NAMES_GET : Get the names of the month
    WEEK_GET_FIRST_DAY : Get the first day of the week
    HRGPBS_HESA_DATE_FORMAT : Format the date in dd/mm/yyyy format
    SD_CALC_DURATION_FROM_DATETIME : Find the difference between two date/time and report the difference in hours
    L_MC_TIME_DIFFERENCE : Find the time difference between two date/time
    HR_99S_INTERVAL_BETWEEN_DATES : Difference between two dates in days, weeks, months
    LAST_DAY_OF_MONTHS : Returns the last day of the month
    DATE_CHECK_PLAUSIBILITY :Check for the invalid date.
    Reward points if useful,
    siri

  • Month for the given Week

    Can anybody tell me how to get the month for the given week..
    In my requirement I have week(201026).
    For this input, i nedd the month for this 26th week .
    Thanks in Advance.
    Moderator Message: Basic Date-related questions are not allowed since they are FAQ.
    Edited by: kishan P on Dec 17, 2010 1:17 PM

    Here's that code modified to something much more like what you specified. It prints the number of weeks between to dates inclusive, eg. there are 4 weeks between "Feb 1, 2003" and "Feb 28, 2003" not 3.something.
    I am now using the number of milliseconds in a day instead of in a week. The value 86400 is 24*60*60.
    I've also changed the input format to support days like
    June 1, 2003. Note you will need to put the args in "" when you run it because of the spaces.
    import java.util.Date;
    import java.text.*;
    public class TestTP
         static double MILLIS_PER_DAY = 86400*1000;
         public static void main( String args[ ] ) {
              double weeks;
              Date d0,d1;
              for (int i = 0; i<(args.length-1); i+=2)
                   d0 = parseDate(args);
                   if(null == d0)System.out.println(args[i]+" is bad");
                   else
                        d1 = parseDate(args[i+1]);
                        if(null == d1)System.out.println(args[i+1]+" is bad");
                        else
                             double days = dayDiff(d0,d1); // get difference in days
                             weeks = (1+days)/7;               // make it inclsive in weeks
                             System.out.println(args[i+1]+" is "+weeks+" weeks after "+args[i]+" inclusive");
         static Date parseDate(String ds)
              Date dt;
              SimpleDateFormat sdf = new SimpleDateFormat("MMM d, yyyy");
              sdf.setLenient(false);
              try{dt = sdf.parse(ds);}
              catch (ParseException e){dt = null;}
              return dt;
         static double dayDiff(Date d0, Date d1)
              return (d1.getTime()-d0.getTime())/(MILLIS_PER_DAY);

Maybe you are looking for

  • Error Showing in Podcast RSS and iTunes shows a "!" when it loads

    I have created eight episodes so far for our podcast series. All podcast episodes were created in Garageband and uploaded to iWeb. In iWeb I published the webpages to our podcas server. The pages show beautifully and the podcasts work well. BUT if so

  • How to find out where a program is installed

    I am not sure of where the Game enemy Territory is installed I know one part is installed under the home /user .wolfet but I ma not exactly sure of where the other folder is . is there a search program that will tell me where it is?

  • Mathematical set operations

    Hello all, every now and then I need the mathematical set operations "intersect", "unify" and "subtract". It's no big problem to implement them where needed, but I wondered if there is an official version in the Java-API. This would be especially use

  • Error - wrong number or tyeps of argument

    Hi All, I am facing error while passing record type parameter to procedure P2. CREATE OR REPLACE PACKAGE Pkg_test AS v_Bulk_Limit NUMBER := 1000; TYPE Test_Rec IS RECORD( F1 NUMBER, F2 NUMBER, F3 NUMBER); PROCEDURE p1(IN_dt DATE); Procedure p2 (in_ta

  • SAP router connection is not working

    Dear Experts, I cannot connect my systems to SAP, getting the below error.My router is not expired and port 3299 is reachable. SAPRouter "dev_rout" log as follows: trc file: "dev_rout", trc level: 1, release: "720" Wed Apr 09 15:55:51 2014 SAP Networ