Need Monday and Friday  dates for 12 weeks.

Hi All,
I need a core java class which takes a curdate as argument and gives the oupt put as only monday and friday dates from that date for 12 weeks.
For example..if u enter the date 07/06/2005.
The ou put:
07/06/2005 07/08/2005 and it should skips the sat&sunday.
o7/11/2005 07/15/2005
07/18 -07/22
07/25 -07/29
08/01 -08/05
08/08 -08/12
08/15 -08/19
like this why because i need to diplay the data in the form of buckets.between these dates.Please help.

Take a look at java.util.Calendar. It has all the methods you need to make your own class for this.

Similar Messages

  • How to calculate start date and last date for current week

    Dear All.
    i want to calculate the start of the current week as well as the last date of the current week, our week start from Saturday and ends of Friday i.e. Saturday is the first day of the week and Friday is the last day of the week.
    How can i acheive this in universe Designer?.
    Please help...

    Hi
    the formulas in webi will be as follows
    for startdate
    =RelativeDate(LastDayOfWeek(CurrentDate());-8)
    for enddate:
    =RelativeDate(LastDayOfWeek(CurrentDate());-2)
    Regards,
    Ranganath

  • Only Monday and important lesson for the week.

    Yeah it's like one small change can set off a chain reaction of mishaps in the most unanticipated, yet in 20/20 hindsight makes sense, ways.One of my business partners asked me to stop by a 3-person company run by one of her friends. They have zero tech support and have problems dealing with Western Digital external hard drive solution. I go there, and the device just is not working. I told the guy "Well hate to this, but it's just not working" And the guy is like "I can't accept that as an answer", and I chuckle to myself "as if the device cares what you will accept", so I take him to google and type out his problem and let him see all the people struggling with it and he's like "Oh I guess there is something wrong with it" And I tell him "Welcome to my job.. googling problems and working out which solutions might work and might not...

    I have a client that has this odd industry app that I guess is always a PITA. I had a small fix to do a few weeks back. He mentions a rep from this software vendor will be coming and installing some new software features to this app and some special hardware. He said I don't know, but we may need you on that day.
    I replied okay, you have all the logins you should need, I think you'll be set. Guy comes, I guess that all goes off without a hitch. The next week though I get email he's like I'mlogging in with this account, I don't recall what we used before.
    This account was for the owner and had a roaming profile setup, and printers had changed from default because this vendors work. He tried changing, but they kept resetting. I told him I think it was probably related to so many profiles on this account being open and they weren't all the...
    This topic first appeared in the Spiceworks Community

  • How to get data for current week and previous week using customer exit in Bex.

    Hi everyone,
    I have a scenario in which I need to display data for current week and previous week (based on "sy_datum" the program has to calculate current week and previous week) in Bex using  Customer exit. I have created one variable in Bex Query Designer and I have written code for the variable in CMOD. But it is not working fine, (I know that we can do the same by using offset value in Bex). Can some one guide me how to achieve my requirement using customer exit.
    Thanks in Advance,
    G S Ramanjaneyulu.

    Hi krishna,
    Thanks for your quick reply, can you have a look at my code,
    case i_vnam.
    WHEN 'ZPWK_CWK'.
    ranges : pre_week for sy-datum.
    data : start_date type DATS,
           end_date TYPE dats .
    ************FM TO GET FIRST DATE OF CURRENT WEEK ************************
    CALL FUNCTION 'BWSO_DATE_GET_FIRST_WEEKDAY'
      EXPORTING
        DATE_IN  = sy-datum
      IMPORTING
        DATE_OUT = start_date.   " WEEK FIRST DATE
    end_date = START_DATE + 6.   " WEEK LAST DATE
    END_DATE   = START_DATE - 1.   " PREVIOUS WEEK END DATE
    START_DATE = START_DATE - 7.   " PREVIOUS WEEK START  DATE
    **********PREVIOUS WEEK DATES IN PRE_WEEK******************
    pre_week-SIGN   = 'I'.
    pre_week-option = 'BT'.
    pre_week-LOW    = START_DATE.
    pre_week-HIGH   = END_DATE.
    APPEND  pre_week.
    CLEAR : START_DATE,END_DATE.
    endcase.
    Regards,
    G S Ramanjaneyulu.

  • How do I change the start date for the week from Monday to Sunday on my iPhone 5?

    How do I change the start date for the week on iCal from Monday to Sunday on my iPhone5?

    Yes. On my new iPhone 5 the iCal week begins on a Monday not a Sunday and does not give me the option to edit in settings on the phone

  • How can I create a matrix question? Specifically, I need a question in table format that allows each respondent to list a number of events and then data for each event (date, location, number of participants, topics covered, etc.

    How can I create a matrix question? Specifically, I need a question in table format that allows each respondent to list a number of events and then data for each event (date, location, number of participants, topics covered, etc.

    Hi,
    Sorry, we do not support a matrix-question field.   Please try the multilines text field (where your participant can enter multiple lines in the input text box) and see if it works for you.
    Thanks,
    Lucia

  • BW reporting question (want to break down the data for 13 weeks)

    Hi All,
    I am building one report in BEx and in that report I need to calculate the data for last 13 weeks.
    What I want here is to breakdown the OTD to CT2R%   and Average delta for 13 weeks.  I mean I want to repeat the same calculation for 13 weeks.
    How can I repeat this calculation and how can I restrict per week.
    OTD to CT2R  (On time delivery to Cycle time to replenish)
    See below the template of my report.
                                  week 1                                   week 2
    Item    OTD to CT2R%    Average delta   OTD to CT2R%   Average delta
    x                 x                      x
    Thanks,
    Kam

    hi, usaully production system will be non changeable for all objects.. but as far as SAP BW is concerned we can make certain objects changeable by setting as follows..
    in production go to RSA1 - Transport Connection, select Object changeability button from tool bar, here you will find a list of objects which can be made changeable in a closed system.. just click on required objects and set it to Everything Changeable..
    Reg,
    Pradhiba
    <REMOVED>

  • Creation and Change Date for Tcode and Function Groups

    Hello All,
    I need to display the Creation and Change Dates for Custom Tcodes and Function Groups in a Report. Can anyone please let me know the logic of retrieving it.
    regards,
    Mahesh

    Hi,
    TADIR and TRDIR is the tables where you can find all these data
    Regards
    Sudheer

  • Getting the start  and end dates of the week

    Hi,
    I was stuck with a problem in getting the start date and end date of the week,i know the month ,week and year also,with these three values how can i get the start and end dates of a week.please help me
    Thanks

    There is no simple way. It has to be a math calculation.
    There are several ways you can get the dates. First you have to know what day is January 1st and what day is december 31st for a particular year. Second you have to check whether the given year is a leap year or not. Based on the abvove information you should be able to find out what day is a particular date.
    Hope this helps to get you started.
    - Venkat Dhurjati.

  • MIN and MAX date for each range

    Hi folks,
    I´ve got the following problem:
    Given a table
    create table t as select 'AT' OM_LANDTEXT, '12345' OM,
                             to_date('01-JAN-2004', 'DD-MON-YYYY') datum from dual
                             union
                             select 'AT' OM, '12345' OM_LANDTEXT,
                             to_date('02-JAN-2004', 'DD-MON-YYYY') datum from dual
                             union
                             select 'AT' OM, '12345' OM_LANDTEXT,
                             to_date('03-JAN-2004', 'DD-MON-YYYY') datum from dual
                             union
                             select 'AT' OM, '12345' OM_LANDTEXT,
                             to_date('05-JAN-2004', 'DD-MON-YYYY') datum from dual
                             union
                             select 'AT' OM, '12345' OM_LANDTEXT,
                             to_date('06-JAN-2004', 'DD-MON-YYYY') datum from dual
                             union
                             select 'AT' OM, '12345' OM_LANDTEXT,
                             to_date('01-FEB-2004', 'DD-MON-YYYY') datum from dual
                             union
                             select 'AT' OM, '12345' OM_LANDTEXT,
                             to_date('02-FEB-2004', 'DD-MON-YYYY') datum from dual
                             union
                             select 'AT' OM, '12345' OM_LANDTEXT,
                             to_date('03-FEB-2004', 'DD-MON-YYYY') datum from dual;
    SQL> select * from t;
    OM OM    DATUM
    AT 12345 01-JAN-04
    AT 12345 02-JAN-04
    AT 12345 03-JAN-04
    AT 12345 05-JAN-04
    AT 12345 06-JAN-04
    AT 12345 01-FEB-04
    AT 12345 02-FEB-04
    AT 12345 03-FEB-04
    8 rows selected.I need to have the first and last date for om and om_landtext for each date range (where "date range" means a set of consecutive dates with no gaps).
    So the ouput should be
    OM OM_LANDTEXT DATVON DATBIS
    AT 12345     01-JAN-04 03-JAN-04
    AT 12345     05-JAN-04 06-JAN-04
    AT 12345     01-FEB-04 03-FEB-04Any ideas...?
    Thanks for your help!
    Best regards,
    Gerd
    Message was edited by: Gerd
    Sorry, I forgot to mention this should be done in pure SQL if possible.
    [email protected]

    This is the plodding, methodical approach I've always taken, which leaves me somewhat in awe of Rod West's solution.
    SELECT om_landtext,
           om,
           MIN(datum) AS min_datum,
           MAX(datum) AS max_datum
      FROM (
    SELECT om_landtext,
           om,
           datum,
           prev_datum,
           COUNT(
             CASE
               WHEN prev_datum IS NULL THEN 'x'
               WHEN prev_datum != datum-1 THEN 'x'
               ELSE NULL
             END
           ) OVER (PARTITION BY om_landtext, om ORDER BY datum) AS grp
      FROM (
    SELECT om_landtext,
           om,
           datum,
           LAG(datum) OVER (PARTITION BY om_landtext, om ORDER BY datum) AS prev_datum
      FROM t
    GROUP BY
           om_landtext,
           om,
           grp;null

  • Creation and Modification dates for android file system

    Hello all, I am working on a project and i noticed a particular scenario where i'm getting an error everytime i try to run the code below on my android device;
                    var file:File=File.applicationDirectory.resolvePath("amf.js");
                    var modDate:Date;
                    var createDate:Date;
                     if(file.exists)
                            try
                                       modDate=file.modificationDate;
                                       credDate=file.creationDate;
                                       trace("Modification date: "+ modDate.toString()+"\nCreation date: "+credDate.toString());
                             catch(e:Error)
                                      trace(e.message+": Somehow android OS CANNOT READ mODIFICATRION AND CREATING DATES FOR FILES");
    Every time i run this on Adobe AIR's Mobile emulator, the correct dates are show up properly(Possibly because the emulator is running on Windows) but when i switch the debug to the device, the statement in the catch block executes. The real error says "Error #3003: File or directory does not exist."
    Am i missing something or is this a normal behaviour which i have to find a work around for? The modificationDate and the creationDate are all properties of the FileReference class which i didnt use to instanciate the file object because i wasnt uploading or downloading anything.
    Any form of tip will be much appreciated.
    Thanks.

    I run into the same problem while working on some sort of file synching task.
    Trying to read the file.modificationDate or creationDate results in an error: "Error #3003: File or directory does not exist."
    I have obeserved that this only happens for files that were packaged with the app (and placed in the File.applicationDirectory).
    Files that my app has downloaded and saved to the device (File.applicationStorageDirectory) do have a valid creation date and modification date.
    Maybe the File.applicationDirectory has different rights?
    Does anybody have a solution or workaround for this?

  • How to Get Each line item Create and Approval dates for a SHOPPING CART in SAP SRM (ABAP Programming)

    Hi All,
    I have to Get Each line item Create and Approval dates for a SHOPPING CART in SAP SRM. Either a table, or any Function module, Method, please let me know ASAP. Same i can use in my Program.
    Thank you Very much.
    Regards,
    Ramesh J.

    Hi,
    Refer the below wiki link it may help you.
    Product catlog configuration for ECC - CRM - SCN Wiki

  • Start and End dates for users in Enterprise portal

    Hi Expert,
    I have to maintain start and end dates for around 200 users in 4 different Java systems. When I export the file of users it does not capture the validity fields. Is there a way/script to automate this? Otherwise I will have to do it manually.

    Hello
    Please check below URL for User Import Format:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/abdd83c3333205e10000000a42189c/content.htm?frameset=/en/48/a96f43db653206e10000000a42189c/frameset.htm&current_toc=/en/43/05e450d1cd6e95e10000000a11466f/plain.htm&node_id=2802&show_children=true#jump2822
    Regards,
    Tapan Goyal

  • Adding a summary column in a table which contains the start and end dates in the week

    Hi,
    I've got a DIMENSION DATE table and want to add in another column which shows the start and end date of the week.
    See below, the new column is WEEKOFYEARTEXT.
    Does anybody know how i may generate this column using SQL and using the existing columns?
    Umar Javed

    See:  http://www.sqlusa.com/bestpractices/datetimeconversion/
    DECLARE @Year INT = '2015';
    WITH cteDays AS (SELECT DayOfYear=Dateadd(dd, number,
    CONVERT(DATE, CONVERT(char(4),@Year)+'0101'))
    FROM master.dbo.spt_values WHERE type='P'),
    CTE AS (SELECT DayOfYear, WeekOfYear=DATEPART(week,DayOfYear)
    FROM cteDays WHERE YEAR(DayOfYear)= @YEAR)
    SELECT WeekOfYear, StartOfWeek=MIN(DayOfYear), EndOfWeek=MAX(DayOfYear)
    FROM CTE GROUP BY WeekOfYear ORDER BY WeekOfYear;
    WeekOfYear StartOfWeek EndOfWeek
    1 2015-01-01 2015-01-03
    2 2015-01-04 2015-01-10
    3 2015-01-11 2015-01-17
    4 2015-01-18 2015-01-24
    5 2015-01-25 2015-01-31
    6 2015-02-01 2015-02-07
    7 2015-02-08 2015-02-14
    8 2015-02-15 2015-02-21
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • I have been trying to update Prelude CS6 and Fireworks CS6 for several weeks but always get an error

    I have been trying to update Prelude CS6 and Fireworks CS6 for several weeks but always get an error message: "U44M1P7". How can I resolve this problem?

    Hi Cellpho,
    Can you try the solution described here?
    http://helpx.adobe.com/creative-suite/kb/error-u44m1p7-installing-updates-ccm.html
    -Dave

Maybe you are looking for

  • Issue with custom fields mapping from CRM to ECC.

    Hi all, I have issues with replicating custom fields in a Service order. I have created new fields with EEWB and EEWC. Now the structure has been changed in ECC and CRM. But i have to map this fields to correct structures. Also i need some logic to a

  • HDMI Connection Handshake

    I'm helping a neighbor whose FIOS TV was not hooked up with an HDMI cable to her HDTV using HDMI cable.  They used component cables, but she needed the component input for her DVD player.  So I bought an HDMI cable and connected it to HDMI input on t

  • Airplay settings on AppleTV 3 grayed out.

    I'm trying to set up my computer for mirroring but the airplay settings are grayed out  and won't allow me in to set it up. Any ideas? Thanks.

  • Scenario's With out XI

    Hi, What are the scenarios we can do with out XI as a Middleware. Regards Suman

  • Exception in thread "main" java.lang.NoClassDefFoundError: HW

    I am very new to java. Tried to take the time to learn but got wrapped up in other things. Now I am back to learn and here is what I am getting. I don't know if it has anything to do with java required files being in a different directory or what. I