How to use the API for DATE, MONTH  AND YEAR

I would like to use the java api in .util.calender in the java api to get the date.
How to implement the API for the "DATE","MONTH","YEAR" which are available provide by java?
can someone give me in one complete code?

From the Java Developers Almanac 1.4:
    Calendar cal = new GregorianCalendar();
    // Get the components of the date
    int era = cal.get(Calendar.ERA);               // 0=BC, 1=AD
    int year = cal.get(Calendar.YEAR);             // 2002
    int month = cal.get(Calendar.MONTH);           // 0=Jan, 1=Feb, ...
    int day = cal.get(Calendar.DAY_OF_MONTH);      // 1...
    int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK); // 1=Sunday, 2=Monday, ...

Similar Messages

  • HT1296 I was using the iCloud for my iPod and had recorded an important Voice Memo on the device. Before I was able to store it on my computer, the device stopped working. I have the data on the Cloud, how can I get that back to my iMac?

    I was using the iCloud for my iPod and had recorded several irreplaceable Voice Memos. It went up to the Cloud, but I wasn't too savvy with the Cloud at that point, so it wasn't syncronizing to my home computer. So, the thing is that the iPod died and the backup is in the Cloud and I would like to load the backup to my iMac to recover my data. How can I do that? Thanks

    The new device I got to replace the iTouch is a iPad and I don't see the playlist I created with previous voice memos on it at all. Is there any way to access them on the iPad? If I erase the iPad and restore it with the old back up will the Voice Memos come along and get in to my home computer or will I be out of luck?

  • How to use java api for function activity in embed oracle workflow?

    because i can't install standalone oracle workflow successfully.
    pls tell me how to use java api for function activity in embed oracle workflow?
    are there some patch or pulg-in package?
    ths a lot...........

    The Java Function Activity Agent is not certified for Oracle Workflow embedded in Oracle Applications. Installing standalone workflow should be a lot easier than what you have found, although it looks like you did hit a Pentium 4 issue with the Oracle Universal Installer. I suggest you contact Oracle Support or Oracle Consulting for assistance.
    because i can't install standalone oracle workflow successfully.
    pls tell me how to use java api for function activity in embed oracle workflow?
    are there some patch or pulg-in package?
    ths a lot...........

  • I have been using XBOX Live for 3 months and recently the...

    I have been using XBOX Live for 3 months and recently the NAT has been set to Moderate and I need it to be open.  I contacted Linksys via phone and said I need port numbers from Xbox Support but I can not contact XBOX via phone.  The number I am using is 1 - 800 - 4MY-XBOX. My router motel is WRT 300N and using the 360 with Call of Duty 4 and Halo 3. Someone know how to fix the NAT setting to Open.  Please make it easy to understand?? Very tried and thinking of swiching routers to anything different!!

    http://forums.linksys.com/linksys/board/message?board.id=Wireless_Routers&thread.id=74742

  • Hello !  pls give some ti[ps how to use bapi's for data uploading?

    hello !
      pls give some ti[ps how to use bapi's for data uploading?
    regards,
    Arjun

    Hi,
    See the below report extract:
    where it_data is having uploaded data.
    LOOP AT<b> it_data</b> INTO wa_data.
        line_count = sy-tabix.
        "Date Validation
        CONCATENATE wa_data-uplft_date4(4) wa_data-uplft_date2(2) wa_data-uplft_date+0(2)
        INTO wa_data-uplft_date.
        "READ TABLE it_ekko INTO wa_ekko WITH KEY lifnr = wa_data-vendor.
        LOOP AT it_ekko_temp INTO wa_ekko_temp WHERE lifnr = wa_data-vendor.
          IF wa_ekko_temp-kdatb <= wa_data-uplft_date AND wa_ekko_temp-kdate >= wa_data-uplft_date.
            MOVE-CORRESPONDING wa_ekko_temp TO wa_ekko.
            APPEND wa_ekko TO it_ekko.
          ENDIF.
        ENDLOOP.
        "IF sy-subrc = 0 AND wa_ekko-kdatb <= wa_data-uplft_date AND wa_ekko-kdate >= wa_data-uplft_date.
        LOOP AT it_ekko INTO wa_ekko.
          wa_data_header-pstng_date = wa_data-uplft_date.
          wa_data_header-doc_date = sy-datum.
          wa_data_header-bill_of_lading = wa_data-bill_of_lad.
          wa_data_header-ref_doc_no = wa_data-del_no.
          CONCATENATE wa_data-header_text1 '-'
                      wa_data-header_text2 '-'
                      wa_data-header_text3 '-'
                      wa_data-header_text4
                      into wa_data_header-HEADER_TXT.
          IF wa_data-indicator = 'Y'.
            wa_data_item-material = '000000000000200568'.
          ELSE.
            wa_data_item-material = '000000000000200566'.
          ENDIF.
          LOOP AT it_ekpo INTO wa_ekpo WHERE ebeln = wa_ekko-ebeln AND matnr = wa_data_item-material.
            "Collect Item Level Data
            wa_data_item-plant = '1000'.
            wa_data_item-stge_loc = '1001'.
            wa_data_item-move_type = '101'.
            wa_data_item-vendor = wa_data-vendor.
            wa_data-qnty = wa_data-qnty / 1000.
            wa_data_item-entry_qnt = wa_data-qnty.
            wa_data_item-po_pr_qnt = wa_data-qnty.
            wa_data_item-entry_uom = 'KL'.
            wa_data_item-entry_uom_iso = 'KL'.
            wa_data_item-orderpr_un = 'KL'.
            wa_data_item-orderpr_un_iso = 'KL'.
            wa_data_item-no_more_gr = 'X'.
            wa_data_item-po_number = wa_ekpo-ebeln.
            wa_data_item-po_item = wa_ekpo-ebelp.
            wa_data_item-unload_pt = wa_data-unload_pt.
            wa_data_item-mvt_ind = 'B'.
            APPEND wa_data_item TO it_data_item.
            CLEAR wa_data_item.
          ENDLOOP.
          CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
            EXPORTING
              goodsmvt_header = wa_data_header
              goodsmvt_code   = goodsmvt_code
              testrun         = 'X'
            TABLES
              goodsmvt_item   = it_data_item
              return          = return.
          READ TABLE return INTO wa_return WITH KEY type = 'S'.
          IF sy-subrc <> 0.
            DESCRIBE TABLE return LINES sy-tfill.
            IF sy-tfill = 0.
              CALL FUNCTION <b>'BAPI_GOODSMVT_CREATE'</b>   
            EXPORTING
                  goodsmvt_header = wa_data_header
                  goodsmvt_code   = goodsmvt_code
                  testrun         = ' '
                TABLES
                  goodsmvt_item   = it_data_item
                  return          = return.
              CALL FUNCTION <b>'BAPI_TRANSACTION_COMMIT'</b>
               EXPORTING
                 WAIT          = 'X'
              IMPORTING
                RETURN        =
            ENDIF.
          ENDIF.
          LOOP AT return INTO wa_return.
            WRITE: 'Messsage TYPE  ', wa_return-type,
                  /,'ID  ', wa_return-id,
                  /, 'Number  ', wa_return-number,
                  /, 'Message  ', wa_return-message,
                  /, 'Long Text  ', wa_return-message_v1,
                                    wa_return-message_v2,
                                    wa_return-message_v3,
                                    wa_return-message_v4,
                 /, 'Failed at line', line_count.
          ENDLOOP.
          CLEAR: wa_ekko, wa_ekpo, wa_data, it_data_item[], wa_data_header.
        ENDLOOP.
    Reward if useful!

  • When I try to turn on my homesharing on apple TV it says that either my apple id doesn't exist or the password is wrong. However, I've been using the id for almost half a year and I even changed my password and it still wouldn't work. How do I fix this?

    When I try to turn on my homesharing on apple TV it says that either my apple id doesn't exist or the password is wrong. However, I've been using the id for almost half a year and I even changed my password and it still wouldn't work. What can I do to fix this?

    Not sure if this Term is Relevant towards an iPhone but, my iPhone won't Post unless if it's plugged into a Charger.

  • How to use the Variants in SAP Transportation and what is its use ?

    Hi experts,
    How to use the Variants in SAP Transportation and what is its use & How to create a variant in SAP ?
    Can anybody answer this ?
    Regards,
    Shakti

    Hi,
    If you are asking about "slection vairants" in SPRO settings of "shipment cost document" then
    When it is activated,
    each user can have his own slecetion  and list criteria for
    1. List shippment costs:calculation
    2. List shippment costs: settlement
    This can be directly saved from VI01 screen by the user.
    from environment> lists
    This is user specific only.
    Hope this helps.
    Regards,
    Sharan

  • How to Upload the Materials for one Plant and then copy the same to all oth

    Hi All,
       I am using Material Types NonStock, Service, Spare Parts and Trading.
       How to Upload the Materials for one Plant and then copy the same to all other plants.
    can anybody give response for this requirement.
    Regards...
    <b></b>

    Hi,
    Using MM01 Only we can upload Plant Details.
    If you want to extend to other plant also, Use MM01 and select Plant view and give new plant details.
    If you want to copy from one plant to another plant after selecting Plant view , next screen you can select From Plant and To Plant Details.
    Reward Points If it helps you.
    Regards,
    Murali K

  • HOW DO use the Mikey 2.0 iPod and iPhone Microphone with my IPHONE4

    HOW DO use the Mikey 2.0 iPod and iPhone Microphone with my IPHONE4

    Did the microphone come with a user manual? You might contact support for the microphone.
    Just so you know the iPhone 4 has a built-in microphone

  • Sales report for current month and year a go month

    i could you please guide me builting report for current monthwise for current month and year a ago month
    report parameter month_year='06-2010'
    tables = sales and below are the table fields
    customer_id
    invoice_dt
    invoice_am
    thanks
    nhm

    Okay, Still you did not mention how you will pass value in report while generating.
    Anyway the query with UNION ALL will work. For Example.
    I am assuming that the parameter for date/month you will pass in range like 01-JUN-2010 to 30-JUN-2010
    SELECT customer_id, SUM(curr_value) curr_value, SUM(past_value) past_value
    FROM
    SELECT customer_id, NVL(SUM(invoice_amount),0) curr_value, 0 past_value
    FROM sales
    WHERE invoice_dt BETWEEN :P_FROM_DATE AND :P_TO_DATE  -- here P_FROM_DATE and P_TO_DATE will be the date range for current year as i showed above.
    AND  -- Any Condition goes here...
    GROUP BY customer_id
    UNION ALL
    SELECT customer_id, 0, NVL(SUM(invoice_amount),0)
    FROM sales
    WHERE invoice_dt BETWEEN ADD_MONTHS(:P_FROM_DATE,-12) AND ADD_MONTHS(:P_TO_DATE,-12) -- This add_months function for the previous year same month.
    AND -- Any condition goes here...
    GROUP BY customer_id
    GROUP BY customer_idNow using the above query you can design the tabular report as you showed the format.
    -Ammad
    Edited by: Ammad Ahmed on Jul 3, 2010 7:55 PM
    added GROUP BY

  • Anyone help me ...I am writing to get Date, Month and Year...I got errors

    Could some body help me:
    I am try to get Date, Month and Year
    I got stuck, Anyone help me this:
    public class DateMonth
    public static void main(String[] args)
    toDay = new toDay("February 21, 2002");
    dayofWeek = today.getDay();
    System.out.println("Current month is " + toDay.getMonth());
    System.out.println("Current day is " + getDate());
    System.out.println("Current year is " + toDay.getYear());
    toDay.setDate(toDay.getDate()+60)
    System.out.println("Sixty days from now is ");
    System.out.println(toDay);
    }

    Try something like this:
    import java.util.*;
    public class DateMonth {
         public static void main(String[] args) {
              // Note: 0 = January
              Calendar calendar = new GregorianCalendar();
              System.out.println("YEAR: " + calendar.get(Calendar.YEAR));
              System.out.println("MONTH: " + calendar.get(Calendar.MONTH));
              System.out.println("WEEK_OF_YEAR: " + calendar.get(Calendar.WEEK_OF_YEAR));
              System.out.println("WEEK_OF_MONTH: " + calendar.get(Calendar.WEEK_OF_MONTH));
              System.out.println("DATE: " + calendar.get(Calendar.DATE));
              System.out.println("DAY_OF_MONTH: " + calendar.get(Calendar.DAY_OF_MONTH));
              System.out.println("DAY_OF_YEAR: " + calendar.get(Calendar.DAY_OF_YEAR));
              System.out.println("DAY_OF_WEEK: " + calendar.get(Calendar.DAY_OF_WEEK));
              // 60 days from now
              calendar.add(calendar.DATE, 60);
              System.out.println("\nSixty days from now");
              System.out.println("MONTH: " + calendar.get(Calendar.MONTH));
              System.out.println("DATE: " + calendar.get(Calendar.DATE));
              System.out.println("YEAR: " + calendar.get(Calendar.YEAR));
    }Remember that January is 0!
    Take a look at the GregorianCalendar class:
    http://java.sun.com/j2se/1.3/docs/api/java/util/GregorianCalendar.html
    Hope this helps!
    DesQuite

  • How to use of API for Cancel Sales Orders

    Hi....
    I want to use API for Cancel Sales Orders. Plz give me advice how we can cancel orders. I know that there is procedure provide in ORACLE APPs (i.e. OE_ORDER_PUB.process_order). But in this procedure i know the how to create and update sales order, but how to Cancel order with the use of this API.
    Plz send me soultion as soon as possible. ITS VERY VERY URGENT BASE.
    Thanks in Advance.

    Hi all,
    We are importing Sales Orders on 11.5.9 using OE_Order_PUB.Process_Order API .We have supplied most of the mandatory fields and the same data works from the front end. When we use the API it throws a Ora 20001.
    A snapshot of the error message.
    SQL> exec pk_process_object.process_order('1o');
    Message Count is :2
    Message is RA-20001: User in Package OE_Header_Util Procedure Get_Order_Number
    Message is :User-Defined Exception in Package OE_Header_Util Procedure
    Pre_Write_Process
    Return Status is ErrorU
    PL/SQL procedure successfully completed.
    --------------------------------------------------------------------------------------------

  • How to find the API for "update" button

    Hi,
    I have a jsp page in JTT(JTF) framework on which an UPDATE button exists.
    I want to add two more fields and the data in those also must be updated to the database.
    So for this i need to find the API which the Update Button calling.
    Please guide me how to find the API.
    The below is the code segment for the Update button.
    function xsubmitForm(){
    //alert("oldStatusCode is " + "<%=oldStatusCode%>" );
    var newStatusCode = getElementValue( document.forms['<%=asfPage.getHTMLFormName()%>'].elements['<%=PageWebBean.makeName(oppCloseForm.getSectionName(),PageWebBean.OBJ,"statusCode")%>']);
    //alert("newStatusCode is " + newStatusCode);
    if (( "<%=openStatusFlag%>" == "Y") && ( newStatusCode == "<%=oldStatusCode%>"))
    if (confirm(<%=MessageUtil.getMessageJSVar(asfPage, "ASF", "ASF_OPP_STATUS_OPEN")%>))
    doAsfAction('<%=asfPage.getHTMLFormName()%>', 'UPD');
    else
    doAsfAction('<%=asfPage.getHTMLFormName()%>', 'UPD');
    Best Regards,
    Venkatesh
    Edited by: Palepu on May 17, 2010 12:22 AM

    Hi,
    Post your question in "Technology - OA Framework" forum for a better/faster response.
    Technology - OA Framework
    http://forums.oracle.com/forums/category.jspa?categoryID=3
    Thanks,
    Hussein

  • How to use the BAPI_GOODSMVT_CREATE for Transfer posting Sales order

    Hi Friends,
    How to use the Bapi BAPI_GOODSMVT_CREATE for transfer posting sales order to sales order.
    pls, send the list of parameteres to pass to the bapi, if program avail please send it to me.
    Thanks in advance
    Shankar

    You have to pass Header and GM code as the INput parameters for uing this BAPI....GM code would be structure.
    Also you have to pass the INternal table Item for the goods mvt cxreate which will contains
          BATCH.
          MOVE_TYPE.
          ENTRY_QNT.
          MOVE_PLANT.
          MOVE_STLOC.
          MOVE_BATCH.
          MOVE_REAS
    these parameters.
    Regards,
    Sushil.

  • How to use the GPU for calculations?

    Hello everybody,
    I am working on a project at the Ruhr-University, where i have to determine the calculation speed of ActionScript, e.g. in calculating MD5 Hash values.
    Is it possible to use the GPU for the calculation? It would be the best, when i can use the GPU and the CPU for the calculations.
    I already know that ActionScript is running on the CPU und the GPU is used for video rendering.
    Is there a chance to use specifically the GPU for the calculation?
    Regards
    Patrick

    HOW TO USE Scroll Panes
    The JScrollPane API

Maybe you are looking for

  • Filter Type in BADI ---- FAGL_DERIVE_SEGMENT

    Hi, When I am trying to Create Implementation for Badi--->FAGL_DERIVE_SEGMENT,it is generating error message  'Specify Filter Types' .What filter type I have to specify? This  BADI iam implementing for PM module. Please help in resolving the issue. T

  • Object view  with nested table and member functions????????????????

    HI frds:) I need some help regarding writeing soem queries.. I have to use view in retreving data and by useing member functions of object. 1) i have to create a nested table by useing type object. 2) i have to create a object wtih member functions i

  • Humble Mozilla Bundle causes all bookmarks to try to load at once.

    Yesterday I clicked on the "Click me" on the Mozilla start screen, apparently activating some kind of web tracking package in the Humble Mozilla Bundle which has been noted by other users. In my case, my bookmarks are organized in folders but now whe

  • Invoking Acrobat PDF compare from Java code

    Need to invoke the Adobe Acrobat XI's PDF compare feature using Java code. Description: ======== We are exploring the possibilities of passing 2 PDF's from Java to Adobe Acrobat XI SDK to get the compared results in new PDF. If anyone has explored wi

  • Average waiting time for applecare standard service replacement????

    Does anyone know how long it usually takes returning you Iphone 4 on the standard replacement option rather than the advanced option which applecare provide you. I sent my iphone on last saturday on the 7th and its not been 9 days but I suppose techn