Specify the output date to be of a Specified date format.

     DateFormat  formatter = new SimpleDateFormat("MM/dd/yyyy");
     String dateString = "12/12/2006";
     Date dateStringInDateFormat = formatter.parse(dateString);
     System.err.println("the date"+dateStringInDateFormat);
     String str1 = formatter.format(dateStringInDateFormat);
     System.err.println("the date in string format"+str1);
     DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT);
     df.setLenient(false);
     Date stick = df.parse(str1);
      System.err.println("The final date to be passed"+stick);The output that i get on screen:
the date Tue Dec 12 00:00:00 GMT 2006
the date in String format 12/12/2006
The final date to be passed Tue Dec 12 00:00:00 GMT 2006
I want the final date to be passed i.e, Date stick to be 12/12/2006
Can anyone helpme in this issue

DateFormats do not change what a Date object contains or how it is displayed. They are only used to format the output when you use them with format(Date). The Date object itself is unchanged and you cannot change it.
So whereever you want to display a date in your particular format you will need to use your DateFormat.

Similar Messages

  • Specify the output file path and print name when printing pages

    hi,
    how can i Specify the output pdf file path and print name when i am using the function PrintPagesSilent from AcroAVDoc Object.
    My Code :-
    Acrobat.AcroAVDoc doc = new Acrobat.AcroAVDoc();doc.Open(path,
    "temp");

    Dear Irosenth,
    i try with different format (doc, docx,  xls, jpg, bmp and txt) and it working successfully, but it give an random name for the file which saved in default folder for Adobe PDF print.
    you can use the following function:
    private void PrintPDF(string[] inputfilepath){
    foreach (string path in inputfilepath){
    Acrobat.
    AcroAVDoc doc = new Acrobat.AcroAVDoc();doc.Open(path,
    "temp"); 
    Boolean v = doc.PrintPagesSilent(0, ((Acrobat.AcroPDDoc)(doc.GetPDDoc())).GetNumPages() - 1, 0, 0, 1);doc.Close(1);
    and calling it by the following code:
    PrintPDF(System.IO.Directory.GetFiles("c:\\t\\printjob"));
    copy all files that you want to convert in side the mentioned path and run it program, then check the defualt print path for Adobe PDF printer.
    test it and reply me. thanks again

  • Specifying the output order of elements in XML using Oracle Reports.

    Hi,
    I am developing an Oracle Reports report, using Report
    Builder 6.0.8.17.0 on WinNT. The requirement is that the report
    will only ever be used to generate XML output.
    However, due to a bug in the XML Parser at the other end,
    it's necessary to have certain elements appear in the XML before
    others.
    e.g. This simplistic example shows XML output from Reports
    runtime, which looks something like this:
    <DEPT id="10">
    <NAME>Government</NAME>
    <EMP id="4435">
    <SAL>12000</SAL>
    <ENAME>Harry Boland</ENAME>
    <EMP>
    <EMP id="8643">
    <SAL>21000</SAL>
    <ENAME>Michael Collins</ENAME>
    <EMP>
    <EMP id="9900">
    <SAL>47000</SAL>
    <ENAME>Eamonn de Valera</ENAME>
    <EMP>
    <LOCATION>
    <ADDRESS type="street">Kildare St.</ADDRESS>
    <ADDRESS type="city">Dublin</ADDRESS>
    </LOCATION>
    </DEPT>
    However, the application that is parsing the XML fails due to
    the fact that it expects the LOCATION element to be the first
    within the DEPT element. i.e. before the NAME or any of the EMP
    elements.
    The way I have developed this is by creating a master query
    which creates a master group, G_DEPT, with two column, ID and
    NAME, and two detail queries and corresponding detail groups, EMP
    and LOCATION. These groups are joined to the master using the
    datalink facility in Report Builder.
    Is there any way in Report Builder I can specify that the
    LOCATION element is to be output for each DEPT element before any
    other element belonging to DEPT?
    Thanks,
    Iibhear.

    The order of the elements is determined by the order of the columns in the Data Model. Note that you can also use the "Exclude from XML output" property to completely omit columns form the XML output.
    Message was edited by:
    Brian Hill
    This applies to Reports 10g. I don't know if it also works in 6i.

  • Bursting Control file, Error!! Could not deliver the output for Delivery

    Hi,
    I am using bursting control file to send report output to email in R12.1.3.
    If the report output is having data, it is working fine. if there is no data it is getting errored out with the below message.
    "Error!! Could not deliver the output for Delivery channel:null "
    In the report output i put "No data found", when i click on view output the output in application is showing as "NO DATA FOUND" in PDF .
    "Bursting VMC Approved Purchase Orders for a period (XML Publisher Report Bursting Program)" got above error.
    my requirement is if there is no data, still i require the output to email.
    Thanks in Advance
    Adina.

    Hi,
    I am facing the same situation and want the bursting program to finish in normal even when there is no data.
    Can you please let me know how you resolved this?
    Thanks
    RG

  • How do i specify the filename for a binary file generated by a JSP?

    I am writing a report generator that has the ability to generate Excel files. The user clicks on a link (exporter.jsp), the page's content-type has been set to "application/vnd.ms-excel" which naturally prompts the user to either save to a file or open directly in Excel.
    It works fine, but requires the user to manually rename the generated file from "exporter.jsp" to "whatever.xls". Furthermore, Firefox will not let you rename the file in save dialog box, it just automatically saves the file as "exporter.jsp", you must rename it from the file browser.
    How do specify the output file name from within JSP?
    Btw, right clicking and selecting "save link as" allows for specifying the file name, but the file that is created is empty.
    Thanks

    You need to set the content-disposition header as well as the content-type.
    here is one article on the subject
    res.setContentType("application/vnd.ms-excel");
    res.setHeader("Content-Disposition", "attachment; filename=" + filename);

  • How do I get variable selections in output when I send the output to Export

    Hi Friends,
    I am working in Web Analyzer and I would like to export the values of the variable selection to excel along with the output for future reference to know this data belongs to mentioned variable selections.
    Is there any setting in BI to get this requirement?
    Thanks in advance,
    Sam
    Edited by: Sam Reddy on Feb 18, 2009 4:00 AM

    Hi,
    I agree we can do it in workbooks but our requirement is to make available this feature in web analyzer only.
    Do you guys have any other way to work around web?
    Thanks,
    Sam.

  • How do I specify an output folder when exporting?

    I am running Adobie Premiere Pro CS5.5.
    I got to File -> Export -> Media. The "export settings" box appears.
    I know how to set the settings for my desired export. The issue I'm having is under "summary" where the output is specified. Often, I find my video is being outputted to random and unwanted folders. My videos have ended up in folders buried deep in my hard drive where a few have been lost forever. How do I specify the output location so I can easily find my video in a place that I want and is convenient?
    -- extremely frustrated.

  • How to specify the target name while deploying a code in OSB-- Plz Help

    Hi all,
    Am working in creating a cluster environment. For my testing i created a new managed server(OSB_Server) in 9001 port in the admin console itself and that server started running. The default managed server(Admin_Server) is in 7001 port. So when i deploy a code in 7001 sb console the WSDL gets exposed in 7001 because the default admin server port is 7001. While deploying a code in service bus admin console we are not specifying the target name. So how to specify the target name while deploying the code in service bus admin console. Plz help me.
    Regards
    Prabhu

    Hi Prabhu,
    There are three kind of server architecture possible for OSB -
    1. Single server - Everything gets deployed on Admin server itself
    2. Admin Server + Single Managed Server for OSB -- OSB configuration gets deployed on OSB managed server. OSB resources (proxy service, WSDL, Schema) will remain available on OSB managed server port only and NOT on admin server port
    3. Admin Server + OSB cluster -- OSB configuration gets deployed on OSB cluster. OSB resources (proxy service, WSDL, Schema) will remain available on OSB Cluster port(s) only and NOT on admin server port
    Converting one type of server architecture to any other type, requires a manual tedious process, so it is suggested that you create domain accordingly i.e. if you need clusters then while creating domain itself, create OSB cluster, so that all OSB applications gets deployed to OSB cluster. I will suggest you to create a clustered domain from scratch and import the configuration from your existing domian to this new clustered domain.
    You may refer-
    http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15022/toc.htm
    Regards,
    Anuj

  • How to convert the output of smartforms into doc format

    Hi friends,
    I want the output of smartform to be saved in doc format. I don't want to view the printpreview screen and then save it. The way we save the output in pdf format I want it to be done in doc format. Please don't suggest this option
    After the print preview, Select the menu Goto->List Display.
    Now select the menu System->List->Save->Local File.
    Now you can select the radio buttion Rich Text Format.
    Now you save the document as a .doc file (say test.doc)
    Regards,
    Satabdi

    Hi friends,
    I want the output of smartform to be saved in doc format. I don't want to view the printpreview screen and then save it. The way we save the output in pdf format I want it to be done in doc format. Please don't suggest this option
    After the print preview, Select the menu Goto->List Display.
    Now select the menu System->List->Save->Local File.
    Now you can select the radio buttion Rich Text Format.
    Now you save the document as a .doc file (say test.doc)
    Regards,
    Satabdi

  • When I load a XML in a XFA form can I specify the font color?

    When I load a XML in a XFA form can I specify the font color?
    Or can I specify background color, font type(bold, ...).

    Moved to LiveCycle modules and development tools

  • SELECT stmt required to retrieve the output data as specified.

    source table:
    Origin      Destination      Miles
    Sydney           Melbourne      1000
    Perth           Adelaide      3000
    Canberra      Melbounre      700
    Melbourne      Sydney      1000
    Brisbane      Sydney      1000
    Perth      Darwin      4000
    Sydney      Brisbane      1000
    Duplicate routes are to be ignored so the output is
    out put:
    Origin           Destination      Miles
    Sydney           Melbourne      1000
    Perth           Adelaide      3000
    Canberra      Melbounre      700
    Brisbane      Sydney           1000
    Perth           Darwin           4000
    Please suggest a select query / sub query with out using any subprograms or functions/pkgs to get the out put table.

    Hi Pawan,
    Try this document
    <b>https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0de1eb8-0b98-2910-7996-8a3c2fcf6785</b>
    Regards,
    ABY

  • How can I specify the default tab in a CHM Output?

    My company uses CHM-based help for some of its products. We build the CHM files from RoboHelp 9, and while these CHM files don't really have a full Index attached to them, the Index tab shows up in the output anyway. Unfortunately, we are suddenly seeing that when the CHM file is launched from our program, the Index tab is displayed by default. We'd rather have the Contents tab be the default look, especially considering that the Index does not exist.
    I have poked around into how you can specify a default tab for a CHM file, and the only information I have found suggests that using a CHM file creates a file (HH.dat) that specifies which tab should be displayed on a user-by-user basis, and that the last tab displayed when you close the CHM should be the first one displayed when you re-open it. While this is true if you open the CHM independent from the product, when you launch it from our program, it's all Index, all the time.
    So, my question is: How can I specify the default tab for a CHM file? Or, failing that, how can I excise the Index tab from my CHM output.

    Hi there
    This will be something up to your application developer to resolve. When s/he issues the call to open the CHM, there are parameters that may be used to always open with the desired tab "in front".
    Point your developer to the link below and advise that s/he is most likely interested in the section titled: Programming Tips.
    Click here to view
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7, 8 or 9 within the day!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • How come the output of the Array Subset VI is 2-D when I specify a 1-D subset?

    1. I'm trying to strip off a row from a 2-D array so I can search for a match within that row. When I use Array Subset and specify one row as the subset (for example, Row Index=0, Row Length=1, Column Index=0, Column Length=(a variable, typically 255), the output is a 2-D array.
    2. Do I have to use Reshape Array on the output of Array Subset to get the desired 1-D array? The help popup says I have have to add m dimension sizes to have the output be an m-dimensional array. If I add a dimension size, I get a 2-D output. If I fall back to one dimension size and hardwire it to '1', I get a 1-D array wire type but apparently the array doesn't contain all the data in the row from the original 2-D array.
    I'm using LV 5.1. What is the easiest way to strip off a row from a 2-D array in LV 5.1?
    I appreciate any help you can provide.
    Thanks,
    Jeff Bledsoe
    Jeffrey Bledsoe
    Electrical Engineer

    JeffreyP wrote:
    What is the easiest way to strip off a row from a 2-D array in LV 5.1?
    The easiest way to has always been just to use the "Index Array" function, choosing the indice of the row you wanted and with nothing wired to the column terminal (the lower one).
    Edit: I'm assuming that by "strip off" you mean "access", not "strip out"/"remove".Message Edited by Donald on 05-13-2005 02:03 PM
    =====================================================
    Fading out. " ... J. Arthur Rank on gong."
    Attachments:
    Index Out Row.jpg ‏6 KB

  • Reg : data is not getting in the output

    hi team,
                 data is not getting in the  output, but it is getting in the debug mode
    REPORT ZSAPP10 .
    *tables : pernr.
    TABLES : PA0001.
    type-pools : slis.
    types : begin of itab,
            pernr type pernr,
            orgeh type orgeh,
            abkrs type abkrs,
            end of itab,
            begin of itab2,
            pernr type pernr,
            vorna type pad_vorna,
            nachn type pad_nachn,
            end of itab2.
    parameter : p_pernr like pa0001-pernr.
    *DATA:  g_cprog  tYPE SY-CPROG.
    data : i_itab1 type table of itab initial size 0,
           i_itab2 type table of itab2 initial size 0.
    data : w_itab type itab,
           w_itab2 type itab2.
    data : t_fieldcat type slis_t_fieldcat_alv,
            w_fieldcat type slis_fieldcat_alv.
    data : t_event type slis_t_event,
            w_event type slis_alv_event.
    data : t_listheader type slis_t_listheader,
           w_listheader type slis_listheader.
    *get pernr.
    w_event-form = 'TOP_OF_PAGE'.
    w_event-form = 'sub1'.
    append w_event to t_event.
    w_listheader-typ = 'H'.
    w_listheader-info = 'this is new top of page'.
    append w_listheader to t_listheader.
    select pernr
           orgeh
           abkrs from pa0001 into table i_itab1 where pernr = p_pernr.
    w_fieldcat-col_pos = 1.
    w_fieldcat-seltext_m = 'personnal no'.
    w_fieldcat-fieldname = 'pernr'.
    w_fieldcat-tabname = 'i_itab1'.
    w_fieldcat-outputlen = '20'.
    append w_fieldcat to t_fieldcat.
    w_fieldcat-col_pos = 2.
    w_fieldcat-seltext_m = 'org. unit'.
    w_fieldcat-tabname = 'i_itab1'.
    w_fieldcat-fieldname = 'orgeh'.
    w_fieldcat-outputlen = '20'.
    append w_fieldcat to t_fieldcat.
    w_fieldcat-col_pos = 3.
    w_fieldcat-seltext_m = 'payroll area'.
    w_fieldcat-tabname = 'i_itab1'.
    w_fieldcat-fieldname = 'abkrs'.
    w_fieldcat-outputlen = '20'.
    append w_fieldcat to t_fieldcat.
    *g_cprog = SY-CPROG.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
               I_INTERFACE_CHECK                 = ' '
               I_BYPASSING_BUFFER                =
               I_BUFFER_ACTIVE                   = ' '
                 I_CALLBACK_PROGRAM                = SY-CPROG
               I_CALLBACK_PF_STATUS_SET          = ' '
               I_CALLBACK_USER_COMMAND           = ' '
               I_CALLBACK_TOP_OF_PAGE            = ' '
               I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
               I_CALLBACK_HTML_END_OF_LIST       = ' '
               I_STRUCTURE_NAME                  =
               I_BACKGROUND_ID                   = ' '
               I_GRID_TITLE                      =
               I_GRID_SETTINGS                   =
               IS_LAYOUT                         =
                 IT_FIELDCAT                       = T_FIELDCAT
               IT_EXCLUDING                      =
               IT_SPECIAL_GROUPS                 =
               IT_SORT                           =
               IT_FILTER                         =
               IS_SEL_HIDE                       =
               I_DEFAULT                         = 'X'
               I_SAVE                            = ' '
               IS_VARIANT                        =
                 IT_EVENTS                         = T_EVENT
               IT_EVENT_EXIT                     =
               IS_PRINT                          =
               IS_REPREP_ID                      =
               I_SCREEN_START_COLUMN             = 0
               I_SCREEN_START_LINE               = 0
               I_SCREEN_END_COLUMN               = 0
               I_SCREEN_END_LINE                 = 0
               IT_ALV_GRAPHICS                   =
               IT_ADD_FIELDCAT                   =
               IT_HYPERLINK                      =
               I_HTML_HEIGHT_TOP                 =
               I_HTML_HEIGHT_END                 =
               IT_EXCEPT_QINFO                   =
             IMPORTING
               E_EXIT_CAUSED_BY_CALLER           =
               ES_EXIT_CAUSED_BY_USER            =
                 TABLES
                 T_OUTTAB                          = I_ITAB1[]
              EXCEPTIONS
                PROGRAM_ERROR                     = 1
                OTHERS                            = 2
    IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
          FORM sub1                                                     *
    FORM sub1.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = t_listheader
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
    ENDFORM.                                                    " sub1

    write this way...
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
            EXPORTING
            i_callback_program                = w_repid
            is_layout                = wa_layout
            i_callback_user_command  = 'USER_COMMAND_ACCT'
            i_grid_title             = 'Document Status Report'
             it_fieldcat                       = it_fcat[]
         IT_SORT                        = IT_SORT[]
             it_events                = it_events
             TABLES
               t_outtab                        = it_final_data[]
          EXCEPTIONS
            program_error                     = 1
            OTHERS                            = 2.

  • How can I specify the PARTITION name at the time of data load?

    Hi,
    I have a table with 4 partitions. By using SQL*Loader I'm going to load data into the same. While inserting the records it should go to the 2nd partition only.
    Where should i specify the Partition name?
    Please clarify me with sample code.
    Thanks.

    Assuming that the partition is empty before the load, I would load the data into a temp table with the same structure as the partitioned table. After all the data is successfully loaded, exchange the partition of the table with the temp table using 'alter table ... exchange partition...'
    Another question is, how is your table partitioned?
    Message was edited by:
    Jens Petersen

Maybe you are looking for

  • How to draw only straight line instead of angled one??

    Dear friends, I saw a very good code posted by guru here(I think is camickr), But I tried to change it and I hope to draw only straight line instead of angled one, can you help how to do it?? Thanks so much. import java.util.*; import java.awt.*; imp

  • Download to Excel 2000 Functionality

    Hi, I use the "Download to Excel 2000" functionality in OBIEE. When i see the output in Excel,columns B and C of excel get merged and display the second column in my report The point here is the first column in the report also has the same property a

  • İs it free to use the "Java Logo" on our web sites.

    Hello I am working in a company who develops computer programs with Java. I want to put the Java Logo on my company's web page. Is is free to use the logo? if not, How can I license it?

  • Cannot read PDF files with safari

    Hello, I cannot read my online magasine with my iPad. When I open it as PDF with safari, I can read the first few pages but then it freezes and safari just shuts down. It's very frustrating! There was a similar post to this in the Mac section where t

  • Admin node in Multi node Configuration

    Hi, Admin used to apply patches / run ad utilities and to run the upgrade tools. If we only one MT then that will be the Admin node. In my Case i am having the 2 middle tier nodes and 1 DMZ node and all all nodes having the s_isAdmin variable ' YES '