Extracting the date of Monday given a date of the same week.

Hi,
I have a instance of Calendar which is set to say
day = 25
month = 7
year = 2006
Now the day comes to be Friday.
I need to extract the date of the immediate previous Monday, which in this case is the 21st.
Is there some way to do that combing given functions and constants of the Calendar class???

actually i can't change the calendar object.
One obvious way is to loop back till the day != Calendar.MONDAY and keep on subtracting 1 from the date, but what i want to know is whether i can use some combinations of functions so that i get the desired result without looping???

Similar Messages

  • How can I synch my ipod to a new computer without losing all my content, purchased and my old copied albums? My PC and backup died in the same week and now I am told I could lose all my content if I synch?

    how can I synch my ipod to a new computer without losing all my content, purchased and my old copied albums?
    My PC and backup died in the same week and now I am told I could lose all my content if I synch?
    I have new purchases on my new laptop but too paranoid to synch the ipod incase I lose the thousands of tunes I copied over from my old collections.

    See these 2 Links...
    Syncing to a New Computer...
    https://discussions.apple.com/docs/DOC-3141
    Recovering your iTunes library from your iPod or iOS device
    https://discussions.apple.com/docs/DOC-3991

  • My iphone 5 dies at 50% battery, and our 4 chargers have all stopped charging within the same week.  anybody know what could be the issue?  its like our apples are having a major meltdown! help!

    Help!  My iPhone 5 has recently started to "die" at about 20 or 30% battery depending on where I am or how cold it is (i.e.it doesnt seem to die as fast with Wifi in my apartment but will drain so quickly and die at 40% battery life when i am at work.  So today, my battery died at 56% YES 56%!!! GRRRRR.  I have tried everything online articles tell you to do in order to conserve battery life.  Also, our chargers have all gone caput this past week.  I believe it is the adaptor as when the cord plugs into the computer it will charge.  WT?  All our apple products have gone berzurk this last week and I beg for an answer!!  The phone is over one year old, along with one charger.  But the other TWO chargers were purchased recently and they all stopped this week.  Any guidance or help with fixing this the most cost effective way would be much appreciated!

    Basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new).  Try each of these in order until the issue is resolved.
    Everything that cames in the box is included in the 1year warranty, unfortunately you're just outside of that warranty.  Regardless, if the above troubleshooting does not resolve, take the device to Apple and they can determine if the issue is the device, the charger(s) or something else.

  • Korea and Apple detinate Nuke in the same week

    Well, I updated. Then when I started up iTunes, the program froze and I had to force quit (force quit said "Not Responding). Then it said that iTunes noticed my purchased files were not on my computer and did I want the put there...I said no and it tried to do it anyway and froze thrice more. Then when I went to the iTunes store, it said my info had change, even though it hadn't and that I needed to update...so I did. Now ALL my stuff is gone...except what I bought from iTunes store...it completely hosed all my other stuff...man wth? I updated my software to 10.4.8 and my HD crashed...updated to iTunes 7 and pod crashes...what? did you guys get a buncha slobs from Microsoft to come work for you? I've been a Apple snob for sometime, but holy crap! I feel like I did when I owned a Dell!
    IX

    I feel your pain. This Itunes release was totally unacceptable. If I did the equivilant in my job I would be fired. It is unbelievable how many problems everyone on this forum is having! Apple needs to fix this ASAP!
    Imac G5   Mac OS X (10.4.8)  

  • Get the date of a particular week day from given date

    I have a given date.
    from that date i want to get the date of sunday of that week
    wat is the best possible way to do the same.
    for eg:
    if i am given 03/11/2007 which is a saturday
    i want to get 27/10/2007 which is the sunday which falls in the same week as of 03/11/2007
    can anybody please help.

    hi,
    Here I am posting code for your requirement.
    Here I am hard coding the date value.
    import java.util.*;
    public class DateTest{
         public static void main(String ar[]){
              Calendar calendar =new GregorianCalendar(2007,7,4);
              System.out.println("DAY_OF_WEEK: " + calendar.get(Calendar.DAY_OF_WEEK));
              calendar.set(2007,7,4-calendar.get(Calendar.DAY_OF_WEEK)+1);
              System.out.println("DAY_OF_MONTH: " + calendar.get(Calendar.DAY_OF_MONTH));
              System.out.println("MONTH: " + calendar.get(Calendar.MONTH));
    }

  • Extract XML data based on column tag

    Dear All,
    i want to extract the XML data type based on column selection.
    For example:
    i have the below xml in my database stored as XMLTYPE() data.
    <c1>10</c1><c2>0011</c2><c3>DEBIT</c3><c4>USD</c4>
    i want to extract the column tag c2&c3 alone. Is there any query to extract the same.
    Waiting for your response.Thanks in Advance.

    Hi,
    How do I set the web service option up correctly?  The XMLs are being created behind the scenes on what data to be used but I don't know how to make the menu only pick the xml based on the menu option.
    I have one XML that populates the menu options and specific XML's that has the data that goes with each menu option. The menu population works great but it doesn't pull the other XML's to populate the charts. This is the part that I need help.
    How do I use the web service to fix this? Any help would be very much appriecated.  I could even send you my dashboard if it helps so you can see what I've gotten so far (it's not all prettied up yet since I wanted to see if it's doable first)
    I'm new to Xcelsius so I apologize if these are newbie questions.
    Thanks,
    Jay

  • Extracting the input from xml document in BPEL

    hi,
    I have a simple JSP which invokes the "101.HelloWorld" provided with the samples.
    The source code for the JSP is as follows:
    <%@page import="com.oracle.bpel.client.Locator" %>
    <%@page import="com.oracle.bpel.client.NormalizedMessage" %>
    <%@page import="com.oracle.bpel.client.delivery.IDeliveryService" %>
    <%@page import="java.util.Hashtable" %>
    <%@page import="javax.naming.Context" %>
    <%@page import="java.util.Map" %>
    <%@page import="org.w3c.dom.Element" %>
    <html>
    <head>
    <title>Invoke HelloWorld</title>
    </head>
    <body>
    <%
        Hashtable jndi = null;
        jndi = new Hashtable(); 
        jndi.put(Context.PROVIDER_URL, "opmn:ormi://BTP6ND09:6003:home/orabpel");
        jndi.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialContextFactory");
        jndi.put(Context.SECURITY_PRINCIPAL, "oc4jadmin");
        jndi.put(Context.SECURITY_CREDENTIALS, "welcome1");
        jndi.put("dedicated.connection", "true");
        jndi.put("dedicated.rmicontext","true");
        String name = request.getParameter("name");
        if(name == null)
            name = "BPEL";
        String xml = "<name xmlns=\"http://btp6nd09:8888/BPELConsole/default/HelloWorld\">" + name + "</name>";
        Locator locator = new Locator("default","bpel",jndi);
        IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
        NormalizedMessage nm = new NormalizedMessage( );
        nm.addPart("payload" , xml );
        deliveryService.post("HelloWorld", "initiate", nm);
        out.println( "BPELProcess  HelloWorld initiated!" );
    %>
    Please refer to the
    BPEL Console
    to see the status of the initiated HelloWorld BPEL Process.
    </body>
    </html>Since the input goes as an xml to the Receive activity, i am not knowing how to extract the "name" element from it in the assign activity. Which "BPEL XPath Extension Function" should i use to extract the same?
    Message was edited by:
    user578981
    Message was edited by:
    user578981

    Hi,
    can you please format your input?
    Otherwise, no one will look into your question or problem.... ;-)

  • Is it possible to extract the text and images using PHP

    Hi friends,
    Is it possible to extract the text and images using PHP, in the same order as it is in the PDF?
    Else is it possible extract the same as XML using PHP, or ASP
    I googled it but its in vain, any help is appreciated.
    Thanks in advance.

    Dear Mike,
    Thanks for your quick reply,
    I mean is it possible to parse the PDF line by line using the PHP.
    I extracted the whole text but couldn't the images. Since the PDF's images are decoded using various methods like DCTDecode, JPXDecode, etc.
    The text is decoded with FlateDecode, which i breaked using a function in PHP.
    Thanks,

  • To retain the same file name in target(File) that coming from source system(AS2).

    Hi All,
    I have a requirement to send the two file from the third party system(GXS) to SAP ECC via SAP PI(version - 7.4). We are using AS2 adapter at the sender side to pick the file and using File Adapter to place the file in ECC.
    Its a pass through scenarion(No ESR part is used).
    Requirement:
    We are going to get 2 files ->Example:  one from Axis and another one from ICICI -> each bank file will have a file name ->
    We have to post the file at the target system with the same name as source file name, the source file name could come dynamically(with diff time stamp).
    Please let me know, Is it possible to achieve the above requirement(we have to retain the file name in target that coming from source system) with Sender AS2 adapter, If yes then please suggest the best approach.
    Regards,
    Pradeep Bawlia

    Hi Guys,
    The above requirement is solved now.
    Solution - I used java mapping for extracting the same source file name and assignning the same to the target system.
    Code:
    public class ExtractFileName_ASMA extends AbstractTransformation{
    public void transform(TransformationInput in, TransformationOutput out) throws StreamTransformationException  
    DynamicConfiguration conf=in.getDynamicConfiguration();
    DynamicConfigurationKey key_AS2FileNmae = DynamicConfigurationKey.create("http://sap.com/xi/XI/AS2/AS2", "AS2Filename");
    DynamicConfigurationKey key_FileNmae = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File", "FileName");
    String As2FileName=conf.get(key_AS2FileNmae);
    conf.put(key_FileNmae, As2FileName);
    try{
    byte b[]=new byte[in.getInputPayload().getInputStream().available()];
    in.getInputPayload().getInputStream().read(b);
    out.getOutputPayload().getOutputStream().write(b);
    catch(Exception e)
    2. Another solution we can use the graphical mapping and need to use the dynamic config UDF at mapping level to acheive this requirement but here is one drawback - we need to do content conversion is this case.
    In case of Java mapping, no need to play with source file.
    WITHOUT USING ESR, WE CAN NOT ACHEIVE THIS REQUIREMENT.
    Regards,
    Pradeep Bawlia

  • How to extract the size and date from a given file

    Hi,
    I want to extract the size and date of a file (it can be either a video, audio or text file) that the user points to the location of. But I am not sure how. Does Java have an api that can do this? If not is there some other way of doing this? Can anyone help? Thanks in advance.

    Have a look at java.io.File, specifically
    public long lastModified()
    This format returned (I find) is nasty, so then use java.util.Date (or java.sql.Date, look the same on the surface to me) to format it.
    Cheers,
    Radish21

  • Open hub Services - How to extract the master data related to a object ?

    Hi Gurus,
    I am implementing OpenHub services for our project, it's on BW 3.5, I have the list of required fields with which I am creating an InfoSpoke. Now I am stuck in some the info objects which are having master data associated with it.
    Example : Business partner(BP) data, when I map the 0BP infobjects in infospoke it's extracting the BP ID (ex: CT065316,CT068638 etc) in flat file but I want the BP name, address & telephone number as well, which are coming from master data table. But I am able to map only 0BP infobjects as a part of ODS/Cube.
    Can any one tell me how to get the master data extracted in the flat file with associated info object???
    Answers will be highly appreciated.
    Regards,
    Kironmoy Banerjee
    Edited by: Kironmoy Banerjee on Oct 1, 2009 3:34 PM

    Hi Kironmay
    Please follow the below mentioned procedure to create a transformation. This is applicable for BW 3.5 as well.
    - Enter your infospoke in the edit mode.
    - On the Transformation tab set the indicator for the Infospoke with Transformation with BADI so that the infospoke is activated.
    - This will take you to the Addin implementation/BADI builder.
    - Enter the short text/description for the implementation. The implementation name is always the same as the technical name of the infospoke
    - The implementation of the BADI is always filter dependant.
    - In the properties tab of the infospoke enter your infospoke under the Filter specifications.
    If you do not specify an InfoSpoke under Filter Specifications, then this implementation is valid for all InfoSpokes. This means that this is called up for all InfoSpokes during the extraction.
    - Activate your class
    - From your interface tab page, double click on the Transofrm Method and you will arrive in the class builder page
    - Here you can enter the code
    - To do a look up of the master data you have to write a code similar to the one I've given below. This is just an example for looking up material master.
    IF FLT_VAL = 'Your infospoke'.
        T_DATA_IN[] = I_T_DATA_IN[].
    Select zstd_cost from /bi0/pmaterial into table T_return
    For all entries in T_DATA_IN
    WHERE material = T_DATA_IN-material.
    ...Continue with your code.
    Append output from T_return to your output E_T_DATA_OUT
    - Activate your method. Return to the BAdI builder. Return to your InfoSpoke.
    I hope this helps.
    Thanks.

  • How can i call ajax and extract the data?

    Hi all,
    I don't know briefly about ajax..i want to learn ajax, so my question is how can i call ajax and extract the data. for ex, i have JSON file
        "mobile": [
                "Name": "Micromax",
                "Model": A310
                "Name": "samsung",
                "Model": grand 2
    for above example how can i call ajax..please anyone explain with small example because it'll help me a lot.
    Thanks & Regards,
    Palsaran

    Hi Palsaran,
    As i understood, your requirement is to POST data from UI to backend.
    The above code you given is not correct if you want to use model based implementation.
    In UI5 you don't need to do an explicit Ajax call, for which we can use Models like OData, JSON etc.
    For your JSON example, you can use like,
    var oModel = new sap.ui.model.json.JSONModel();
    var oData = "YOUR JSON DATA";
    oModel.setData(oData)
    oModel.loadData(yourURL/Entityset,"POST");
    For ref, you can use the below link
    JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.ui.model.json.JSONModel
    Thanks
    Naveenraj

  • Delta Problem while extracting the data by using function module

    Hi Experts,
    I have extracted the data by using Function module, for delta loads I have given Calday and additive delta in Generic delta settings, in BW side I have initialized the data after that I have given delta update option in infopackage and I made process chain also, every day process chain is running successfully but it is showing zero records, but there is a data in Data source (RSA3), means delta is not working.
    What is the problem,
    Is there any another settings for delta loads,
    Please help me to do this,
    Helpful answer will be appreciated with points,
    Regards,
    Venkat

    Hi,
    Try this delta type :NEW STATUS FOR CHANGED RECORDS.
    More information from Nagesh, this information may help
    1. New status for changed Records.
    2. Additive delta.
    New status for changed records means
    New Order
    order no quantity
    1000 10
    order changed to quntity 8. then 2 records will posted 2 BW in first case.
    1000 -10
    1000 8
    if you come to Additve delta.
    for the same case it will send the same record as
    1000 10
    changed records
    1000 -2
    this is the difference. New status with changed records should be used only in association with ODS not cube becoz we don't have overwrite option.
    Additive delta we can use for ODS and Cubes with update mode Addition.
    Regards,
    Satya

  • Extract data of a company within the same client.

    Hi gurus. If I have more than one company configured in the same client in the ERP, Is there any way to extract data of only one of those companys in order to transfer or copy this information in other ERP?.
    I've listened about TDMS but I'm looking for any procedure or tool that ensure that only the data of one company of multiples is extracted.
    Thanks a lot!. Greetings from Colombia.

    Hi,
    Could you please clarify what all data you want to extract. Is it master data ?
    Incase you want to extract master data to any external system you can you SAP standard IDOCs using ALE.
    Also you can put a filter in the distribution model to filter the extract data only to relvant company codes.
    Thanks
    Neel

  • Error while extracting the data in R/3 production system,

    Hi Team,
    We got the following error while extracting the data in R/3 production system,
    Error 7 When Sending an IDoc R3 3
    No Storage space available for extending the inter 44 R3 299
    No storage space available for extending the inter R3 299
    Error in Source System RSM 340
    Please guide us to fix the issue

    It´s very difficult to help you without knowing
    - what is going to be transferred
    - where you get this error
    - system configuration
    - actual memory usage
    - operating system
    - database and configuration etc. etc.etc. etc.
    I suggest you open an OSS call and let the support have a look on your system. It´s much easier if one has system access to find out the cause for that problem.
    Markus

Maybe you are looking for

  • Error while trying to index a bfile

    hi, I have encountered the following error will trying to index a bfile . Following are the error messages, the listener.ora and creation script. I'm using a AIX Ver 4.3.3 J50 machine and my oracle version is 8.1.7 Thanks Creation Script SQL> create

  • Phantom fonts in pdf documents

    We create our company newsletter in Adobe InDesign CS3 on a Windows XP system. We also post a pdf on our intranet, created with InDesign's export function. Often, but not consistently, users complain about missing characters in the on-line version, v

  • Sql services are not able to start in server

    We have rebooted inactive the server due to rolling maintenance. Sql is not running and sql services are not able to start. Getting the below error message while starting the services. please suggest how to fix?

  • Reinstalling from Tiger Disk without a DVD/CD drive

    I have an iBook g4 with a missing dvd/cd drive. I have my Tiger installation disk i want to use to create a clean reinstall of Tiger. What's the best way to achieve this?

  • Move to next record / wildcard search

    Hi Hope you can understand this explanation.. I have searchable database for Holiday & Residential property here http://www.roomtobreathesl.com (search facility in the navigation menu) The results page for this search works fine for when you specify