Problem Storing Data Recursively

Gday, I got stuck with a bit of recursion today. Basically, I'm making a method which checks if any of the children of a node in a tree contain a prefix. Then I'll store these results into an array. Then I'll go through my array and see if any of their children contain a preffix, placing those new results in an array (perhaps the same one?)
I have a method I was going to use for the base case, .hasInternal() which checks if there are any children below it, but I can't quite get it all working recursively, there's no limit on the length of the prefix so I can't hardcode it.
InternalNode[] a = root.getInternalChildrenPrefix(prefix.charAt(x), x);
x++;
for(int k=0; k<a.length;k++){
InternalNode[k] b = a[k].getInternalChildrenPrefix(prefix.charAt(x), x);
Thanks for any help.

ALoneWolves wrote:
Ok. So this is from my radix tree class.
Please use the code tags when posting code (1. copy-and-paste your code, 2. select it, 3. press "CODE" just above the text area). The result will look like this:
     public int numberOfGenes(String prefix) {
          int matches = 0;
          if(root.hasInternal()!=true){
               String[] array = root.getLeafChildrenName();
               for(int i=0; i<array.length;i++){
                    for(int j=0; j<prefix.length();j++){
                         if(prefix.charAt(j)==array.charAt(j)){
                         matches = matches+1;
          else{
               int x = 0;
               if(x != prefix.length()){
               InternalNode[] a = root.getInternalChildrenPrefix(prefix.charAt(x), x);
               x++;
               for(int k=0; k<a.length;k++){
                    InternalNode[k] b = a[k].getInternalChildrenPrefix(prefix.charAt(x), x);
          return matches;
And from my internal node class I have:      public boolean hasInternal(){
          if(this.InternalChildren.size()>0){
               return true;
          return false;
     public InternalNode[] getInternalChildrenPrefix(char pref, int k){
          InternalNode[] samePrefixes = null;          
          for(int x = 0; x<InternalChildren.size(); x++){
          InternalNode a= InternalChildren.get(x);
          String aname = a.getPrefix();
          if(prefix.charAt(k)==pref){
               samePrefixes[x] = a;
          return samePrefixes;

Similar Messages

  • Problem storing date in MS Access using JSP

    Hi all,
    Can anyone please help me storing date in MS Access using Java i am getting errors. I think it is probably because MS Access take "date/month". I am entering a string with date and month example
    1st October as "0110". I don't know how to enter a date in MS Access.
    Here is my code.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <%@page import="java.io.*"%>
    <%@page import="java.sql.*"%>
    <HTML>
    <HEAD>
    <TITLE>  </TITLE>
    </HEAD>
    <BODY>
    <%
       String emplno = request.getParameter("emplno");
       String date = request.getParameter("date");
       String proposal = request.getParameter("proposals");
       String network1 = request.getParameter("network");
       String suppassociates = request.getParameter("suppasso");
       String intmngt = request.getParameter("intmgt");
       String client[] = request.getParameterValues("client");
       String client1= request.getParameter("client1");
       String clientunit[] = request.getParameterValues("clientunit");
       String clientunit1=request.getParameter("clientunit1");
       int staffid = Integer.parseInt(emplno);
       double proposalunit=Double.parseDouble(proposal);
       double suppliersunit=Double.parseDouble(suppassociates);
       double networkunit=Double.parseDouble(network1);
       double internalmgtunit=Double.parseDouble(intmngt);
       Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
       Connection con = DriverManager.getConnection("jdbc:odbc:finalmp" );
       String activities= "INSERT INTO StaffActivities (StaffID,Date,ProposalUnit,NetworkingUnit,SuppliersAssociatesUnit,InternalMGTUnit) VALUES (?,?,?,?,?,?)";
       PreparedStatement pstmt = con.prepareStatement(activities);
       pstmt.setInt(1,staffid);
       pstmt.setString(2,date);
       pstmt.setDouble(3,proposalunit);
       pstmt.setDouble(4,suppliersunit);
       pstmt.setDouble(5,networkunit);
       pstmt.setDouble(6,internammgtunit);
       pstmt.executeUpdate();
       //String emplno="hello";
       //String entered_date="hello";
       //int access_date=0;
       //int user_date=0;
       if(pstmt!=null)
         pstmt.close();
       if(con!=null)
         con.close();
    %>  
    </BODY>
    </HTML>

    i hope this can help you
    public static String convertToISOFormat(Date dateTime) {
            // ISO Format: 'YYYY-MM-DD HH:MM:SS'
            String returnValue = fillLeft(String.valueOf(dateTime.getYear()+1900), 4,
                    '0')
                    + "-"
                    + fillLeft(String.valueOf(dateTime.getMonth()+1), 2, '0')
                    + "-"
                    + fillLeft(String.valueOf(dateTime.getDate()), 2, '0')
                    + " "
                    + fillLeft(String.valueOf(dateTime.getHours()), 2, '0')
                    + ":"
                    + fillLeft(String.valueOf(dateTime.getMinutes()), 2, '0')
                    + ":" + fillLeft(String.valueOf(dateTime.getSeconds()), 2, '0');
            return returnValue;
        }

  • LCDS 2.5.1: Problems storing Date() in database

    Hi all!
    I hope someone is able to help me with with this:
    I've got a [Managed] [RemoteClass] public class Project, that is stored and updated just fine on Microsoft SQL Server, using msbase.jar and mssqlserver.jar from Microsoft.
    However, as I include a Date(), the LCDS complains about not recognizing the data type:
    [Flex 3] 08/07/2008 13:52:30.525 [DEBUG] [Service.Data.Transaction] Started transaction using jndi name: java:comp/UserTransaction
    [Flex 3] 08/07/2008 13:52:30.540 [DEBUG]
    [Service.Data.SQL] SQL Assembler jdbc exception on operation=update-item error=java.sql.SQLException:
    [Microsoft][SQLServer 2000 Driver for JDBC]Unable to determine the type of the specified object.
    at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
    at com.microsoft.jdbc.base.BasePreparedStatement.setObject(Unknown Source)
    at flex.data.assemblers.SQLAssembler.setSQLParameters(SQLAssembler.java:1342)
    at flex.data.assemblers.SQLAssembler.updateItem(SQLAssembler.java:1206)
    at flex.data.adapters.JavaAdapter.doUpdateItem(JavaAdapter.java:1659)
    I've tried playing the RemoteClass, extending Date(), trying variations the data-management-config.xml without any success.
    Anyone worked with dates and MSQL?
    Are there newer versions of msbase.jar and mssqlserver.jar? Other ways?
    Regard,
    Vegard

    This is a bit similar to a problem I had about a year ago... I believe my error may differ slightly because I was using the SQL Server 2005 edition of the driver:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=583&threadid =1289201&messageid=4664480
    The workaround I ended up using was not something I was happy with, but this was for a small internal project so it was good enough for me. As I said at the time the solution is "a bit dodgy", and I offered the diffs for the jTDS source but nobody has asked to date. I may still have these somewhere, but they will be for an out of date version of the driver by now.
    I'd suggest contacting Adobe support if you have an agreement in place, perhaps there is a patch or better workaround than I could come up already available.
    Altering the database driver is really not ideal, and if the source to SQLAssembler was available I believe it should be fairly simple to implement a workaround there.
    It may also be worth confirming this still occurs in version LCDS 2.6.

  • Having problem with storing data in array

    Hi,
    I'm having problem on storing data in array. My problem is that each time it loops, the array just keep overwrite instead save to the next index. Like at 0 the value is 123, and 1 is 234. But i having that all data capture all overwrite at 0 till the last data it still show at 0. How do i correct this problem?
    Solved!
    Go to Solution.

    How to use array to do comparison? Like Array 1 go thru array 2 to get data Loss out and build an array. Like Array 1 ,1000,1024,1048,etc before 1520 fall in between Array 2 range 1000-1500. So Freq 1000,1024,1048 etc will get Loss value as 1 and 1520 fall in between 1500-2000 will output Loss 2. and so on till the end of the list. How should do this? Need help on this.
    Array 1                                                Array 2
    Freq                                              ​     Freq   Loss
    1000                                              ​    1000      1
    1024                                              ​    1500      2
    1048                                              ​    2000      3
    1100                                              ​     :
    1200                                              ​     :
    :                                                 ​        18000
    1520
    18000

  • SAP paging overflow when storing data in the ABAP/4 memory.

    I am trying to create a data source in  BI7.0 in the Datawarehousing Workbench. But along the process when i need to select a view i get an error detailed in the following error file extract: Please go through and assist.
    untime Errors         MEMORY_NO_MORE_PAGING
    Date and Time          06.06.2009 14:21:35
    Short text
    SAP paging overflow when storing data in the ABAP/4 memory.
    What happened?
    The current program requested storage space from the SAP paging area,
    but this request could not be fulfilled.
    of this area in the SAP system profile.
    What can you do?
    Note which actions and input led to the error.
    For further help in handling the problem, contact your SAP administrator
    You can use the ABAP dump analysis transaction ST22 to view and manage
    termination messages, in particular for long term reference.
    Error analysis
    The ABAP/4 runtime system and the ABAP/4 compiler use a common
    interface to store different types of data in different parts of
    the SAP paging area. This data includes the
    ABAP/4 memory (EXPORT TO MEMORY), the SUBMIT REPORT parameters,
    CALL DIALOG and CALL TRANSACTION USING, as well as internally defined
    macros (specified with DEFINE).
    To store further data in the SAP paging area, you attempted to
    allocate a new SAP paging block, but no more blocks were
    available.
    When the SAP paging overflow occurred, the ABAP/4 memory contained
    entries for 20 of different IDs.
    Please note:
    To facilitate error handling, the ABAP/4 memory was
    deleted.
    How to correct the error
    The amount of storage space (in bytes) filled at termination time was:
    Roll area...................... 8176
    Extended memory (EM)........... 13587912
    Assigned memory (HEAP)......... 0
    Short area..................... " "
    Paging area.................... 40960
    Maximum address space.......... " "
    By calling Transaction SM04 and choosing 'Goto' -> 'Block list',
    you can display an overview of the current roll and paging memory
    levels resulting from active users and their transactions. Try to
    decide from this whether another program requires a lot of memory
    space (perhaps too much).
    The system log contains more detailed information about the
    termination. Check for any unwanted recursion.
    Determine whether the error also occurs with small volumes of
    data. Check the profile (parameter "rdisp/PG_MAXFS", see
    Installation Guidelines).
    Is the disk or the file system that contains the paging file
    full to the extent that it cannot be increased, although it has
    not yet reached the size defined in the profile? Is the
    operating system configured to accommodate files of such a
    size?
    The ABAP processor stores different types of data in the SAP
    paging area. These include:
    (1) Data clusters (EXPORT ... TO MEMORY ...)
    (2) Parameters for calling programs (SUBMIT REPORT ...),
    Dialog modules (CALL DIALOG ...) and transactions
    (CALL TRANSACTION USING ...)
    (3) Internally defined program macros (DEFINE ...)
    Accordingly, you should check the relevant statements in a program
    that results in an overflow of the SAP paging area.
    It is critical when many internal tables, possibly with
    different IDs, are written to memory (EXPORT).
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    "MEMORY_NO_MORE_PAGING" " "
    "SAPLWDTM" or "LWDTMU20"
    "TABC_ACTIVATE_AND_UPDATE"
    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:
    1. The description of the current problem (short dump)
    To save the description, choose "System->List->Save->Local File
    (Unconverted)".
    2. Corresponding system log
    Display the system log by calling transaction SM21.
    Restrict the time interval to 10 minutes before and five minutes
    after the short dump. Then choose "System->List->Save->Local File
    (Unconverted)".
    3. If the problem occurs in a problem of your own or a modified SAP
    program: The source code of the program
    In the editor, choose "Utilities->More
    Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.

    Hi Huggins,
    Maintenance of the Paging File is owned by your basis team.
    They should increase this in order for your transaction to process successfully.
    Just for your reference, in case the OS used is windows server 2003, paging file value can be checked through;
    Right click in the My Computer&gt;properties.
    Then go to Advance tab;
    Then there should be a performance section, click the settings
    Then Advance tab again. The paging file can be seen from there.
    (and can be adjusted from there also)
    The value of the paging file in general will be dependent with the available RAM from the hardware.
    Hope this helps. Thanks a lot.
    - Jeff

  • Problem with data distribution from HCM to e-Recruiting

    Hello masters:
    I have a problem when I try to distribute data from HCM to e-Recruiting. I´m getting code 51 just for the PA infotypes segments (E1P0000, E1P0001, etc.). The error message tha I am receiving is:
    "Error in subroutine read_namtb for structure of infotype".
    My e-Recruiting system is SAP EHP 1 for SAP NetWeaver 7.0, so I'm using Business Partners for storing data from PA infotypes.
    I'm using message type HRMD_ABA, basic type HRMD_ABA05.
    I think it could be the implementation HRRCF00_INBD_NEWMOD from the badi HRALE00INBOUND_IDOC, because it usually get inactive even though I go to activate it.
    Does anybody knows what can I do?
    Thanks in advance!
    Edited by: Rodrigo Arenas Arriola on Jun 25, 2009 2:45 AM

    Hello Rodrigo,
    Ifyou are using EhP1 for NW 7.0 you should have E-Recruiting 600 EhP 4 on your system.
    I never encountered this special error message so far, so i have to "guess". The message indicates that the system had trouble reading some infotype information.
    The ALE distribution for EhP4 is storing the PA data in new infotypes 558*. The error you get points to a missing BAdI activation. If the BAdIs are not activated correctly, ALE will try to write the information from the PA infotypes 1 to 1 into the E-Recruiting system. But E-Recruiting does not know the PA infotypes which should exactly lead to the error you get.
    Could you check the following settings:
    BAdI                     Implementation 
    HRSYNC_P                 CONV_HR_DATA_TO_EREC -> active
    HRALE00INBOUND_IDOC      HRRCF00_INBD_NEWMOD -> active
    HRALE00SPLIT_INBOUND     HR_INB_PROCESS_IDOC -> inactive
    HRALE00INBOUND_IDOC      HRRCF00_DELETE_SPREL -> inactive
    Kind Regards
    Roman

  • InvokeAll on off-heap stored data

    I'm using a distributed cache with partitioned off-heap storage because all the data can't be contained in the heap memory. However, profiling the heap memory still show the storage worker threads still have enormous amounts of data in memory even after GC's.
    So that's why I was wondering what happens, when you do something like
    myCache.invokeAll(new EqualsFilter("someProperty", "someValue"), new MyEntryProcessor());and there's no index on "someProperty".
    When the storage containing node receives the invocation request, it must get all stored data from off-heap memory to heap memory to filter it and optionally apply the EP to it.
    How does it do that? Does it end up loading all data in heap memory? The filtered and unfiltered ones? Or is the processing done entry per entry only keeping a reference to the entry being filtered and processed by the EP?
    I'm using Coherence 3.5.3 patch5.
    Regards
    Jan
    Edited by: user10601659 on Oct 12, 2010 6:59 AM

    Hi Jan,
    user10601659 wrote:
    Hi Robert,
    so what you're saying is that suppose I have 1000 objects in the cache and 500 of them match my filter, those 500 objects need to fit in my heap space when I do cache.invokeAll(Filter, EntryProcessor).
    Potentially all 500 may need to fit (e.g. if they are in the same partition). Also, I suspect, besides the Java form, the Binary version of the object also will need additional capacity while you are executing the processAll method.
    If this holds true, wouldn't it be a workaround to use a PartitionedFilter or a LimitFilter and invoke the EntryProcessor per partition or per #objects? This way the number of matching objects can be reduced.
    Regards
    JanYou can use PartitionedFilter or LimitFilter or whatever approach to break down data processed at the same time to more manageable chunks. The main problem with this multiple roundtrip approach is that cached data may change between getting the individual chunks, so you get weaker consistency across those chunks. (Data in individual chunks will not necessarily be consistent with each other). Whether this is a problem for you or not, is something which only you can decide. Whatever you do, cross partition guarantees may not be provided anyway, but if chunking only by numbers, you may lose consistency for data residing within a single partition, too.
    Best regards,
    Robert
    Edited by: robvarga on Oct 13, 2010 2:19 PM

  • Since updating my  phone 4s with 6.1.1 I tunes still sees my phone as a new phone despite having successfully restored it with my old stored data; means I cannot progress to the next stage i.e. I cannot synch to my Mac

    Since updating my  phone 4s with 6.1.1 I tunes still sees my phone as a new phone despite having successfully restored it with my old stored data; ( I have done this twice) -means I cannot progress to the next stage i.e. I cannot synch to my Mac. My phone memory of 13GB was almost full before I updated and I get an error message when I try to restore with my original back up that there is insufficient memory for t his;it does restore ok with other back ups it offers which leave 1.5GB free on the phone but then I get the problem as above-I Tunes cannot get out of seeing my phone as a new phone and wanting me to restore again ie a loop and I cannot progress to the synch page
    Any help/advice gratefully received!

    You need to transfer Old iTunes library from Windows to new iMac
    Migration from Windows to Mac

  • Problem while  data processing TRANSACTION data from DSO to CUBE

    Hi Guru's,
    we are facing problem while  data processing TRANSACTION data from DSO to CUBE. data packets  processing very slowly  and updating .Please help me regarding this.
    Thanks and regards,
    Sridhar

    Hi,
    I will suggest you to check a few places where you can see the status
    1) SM37 job log (give BIrequest name) and it should give you the details about the request. If its active make sure that the job log is getting updated at frequent intervals.
    2) SM66 get the job details (server name PID etc from SM37) and see in SM66 if the job is running or not. See if its accessing/updating some tables or is not doing anything at all.
    If its running and if you are able to see it active in SM66 you can wait for some time to let it finish.
    3) RSMO see what is available in details tab. It may be in update rules.
    4) ST22 check if any short dump has occured.
    You can also try SM50 / SM51 to see what is happening in the system level like reading/inserting tables etc.
    If you feel its active and running you can verify by checking if the number of records has increased in the cube.
    Thanks,
    JituK

  • Having a problem with dates when I send my numbers doc to excel. dates are all out and that they have to cut and paste individual entries onto their spreadsheet. Any idea how I can prevent this

    having a problem with dates when I send my numbers doc to excel. dates are all out and that they have to cut and paste individual entries onto their spreadsheet. Any idea how I can prevent this.
    I'm using Lion on an MBP and Numbers is the latest version

    May you give more details about what is wrong with your dates ?
    M…oSoft products aren't allowed on my machines but I use LibreOffice which is a clone of Office.
    When I export from Numbers to Excel and open the result with LibreOffice, the dates are correctly treated.
    To be precise, dates after 01/01/1904 are correctly treated. dates before 01/01/1904 are exported as strings but, as it's flagged during the export process, it's not surprising.
    Yvan KOENIG (VALLAURIS, France) mardi 3 janvier 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : http://public.me.com/koenigyvan
    Please : Search for questions similar to your own before submitting them to the community
    For iWork's applications dedicated to iOS, go to :
    https://discussions.apple.com/community/app_store/iwork_for_ios

  • Problem with date format when ask prompt web-intelligence

    Bo XIR2 with 5 SP. Instaled on Windows 2003 with support Russian.
    Inside BO every labels, buttons - use russian. But when invoke web-report and Prompt appear there is problem with date format.
    Looks like korean format of date 'jj.nn.aaa H:mm:ss'.  I see system settings of date in Win .. everything right
    What i have to do?
    Where i can change format date for bo?

    GK, try this...
    decode(instr(packagename.functionname(param1 ,param2),'2400'), 0, to_date(to_char(to_date(rtrim(packagename.functionname(param1 ,param2),'(PT)'), 'Month dd, yyyy "at" hh24mi'),'mm/dd/yyyy hh24mi'),'mm/dd/yyyy hh24mi'),
                                                                      to_date(to_char(to_date(rtrim(packagename.functionname(param1 ,param2),'(PT)'), 'Month dd, yyyy "at" "2400"')+1,'mm/dd/yyyy "0000"'),'mm/dd/yyyy "0000"'))-Marilyn

  • Problem with Date format

    Got one more problem Merilyn and Radhakrishnan...
    Regarding the soln y provided me earler with the thread "Problem with date format"...
    What is happening is....I am able to change the 2400 to 0000 but when it is changed from 2400 on jan 1st to 0000 the hour is changing but not the date....the date still remains as jan 1st instead of jan 2nd....
    Eg: Jan 1st 2400 -- changed to -- jan1st 0000
    instead of jan 2nd 0000
    Could you please help me in this issue...
    Thanks,
    GK

    GK, try this...
    decode(instr(packagename.functionname(param1 ,param2),'2400'), 0, to_date(to_char(to_date(rtrim(packagename.functionname(param1 ,param2),'(PT)'), 'Month dd, yyyy "at" hh24mi'),'mm/dd/yyyy hh24mi'),'mm/dd/yyyy hh24mi'),
                                                                      to_date(to_char(to_date(rtrim(packagename.functionname(param1 ,param2),'(PT)'), 'Month dd, yyyy "at" "2400"')+1,'mm/dd/yyyy "0000"'),'mm/dd/yyyy "0000"'))-Marilyn

  • Problem with date calculation

    I am a rookie in SAP i have a small problem with date.Do we have any function module to find out the first day in a month if we give out the system current date ?? Pls help me out.

    Hi,
    As Ganesan told,you can do.
    Here is the sample code.
    data v type sy-datum.
    data d type DTRESR-WEEKDAY.
    v+6(2) = '01'.
    v4(2) = sy-datum4(2).
    v0(4) = sy-datum0(4).
    CALL FUNCTION 'DATE_TO_DAY'
      EXPORTING
        date          = v
    IMPORTING
       WEEKDAY       = d.
    write d.

  • Problem with date format from Oracle DB

    Hi,
    I am facing a problem with date fields from Oracle DB sources. The date format of the field in DB table is 'Date base type is DATE and DDIC type is DATS'.
    I mapped the date fields to Date characters in BI. Now the data that comes to PSA is in weird format. It shows like -0.PR.09-A
    I have changing the field settings in DataSource  to internal and external and also i have tried mapping these date fields to text fields with out luck. All delivers the same format.
    I have also tried using conversion routines like, CONVERSION_EXIT_IDATE_INPUT to change format. It also delivers me the same old result.
    If anybody of you have any suggestions or if anybody have you experienced such probelms, Please share your experience with me.
    Thanks in advance.
    Regards
    Varada

    Thanks for all your reply. I can only the solutions creating view in database. I want some solution to be done in BI. I appreciate if some of you have idea in it.
    The issue again in detail
    I am facing an issue with date fields from oracle data. The data that is sent from Oracle is in the format is -0.AR.04-M. I am able to convert this date in BI with conversion routine in BI into format 04-MAR-0.
    The problem is,  I am getting data of length 10 (Output format) in the format -0.AR.04-M where the month is not in numericals. Since it is in text it is taking one character spacing more.
    I have tried in different ways to convert and increased the length in BI, the result is same. I am wondering if we can change the date format in database.
    I am in puzzle with the this date format. I have checked other Oracle DB connections data for date fields in BI, they get data in the format 20.081.031 which will allow to convert this in BI. Only from the system i am trying creating a problem.
    Regards
    Varada

  • Problem with date format dd/mm/yyyy. But I need to convert yyyy-mm-dd.

    Dear friends,
    I have the problem with date format. I receiving the date with the format dd/mm/yyyy. But I can upload to MySQL only in the format of yyyy-mm-dd.
    how should I handle this situation, for this I've created these code lines.But I have some problem with these line. please help me to solve this problem.
    String pattern = "yyyy-mm-dd";
    SimpleDateFormat format = new SimpleDateFormat(pattern);
    try {
    Date date = format.parse("2006-02-12");
    System.out.println(date);
    } catch (ParseException e) {
    e.printStackTrace();
    System.out.println(format.format(new Date()));
    this out put gives me Tue Apr 03 00:00:00 IST 2007
    But I need the date format in yyyy-mm-dd.
    regards,
    maza
    thanks in advance.

    Thanks Dear BalusC,
    I tried with this,
    rs.getString("DATA_SCAD1")// where the source from .xls files
    String pattern = "yyyy-MM-dd";
    SimpleDateFormat format = new SimpleDateFormat(pattern);
    try {
    Date date = format.parse("DATA_SCAD1");
    System.out.println(date);
    } catch (ParseException e) {
    e.printStackTrace();
    System.out.println(format.format(new Date()));
    this out put gives me Tue Apr 03 00:00:00 IST 2007
    But I want to display the date format in yyyy-mm-dd.
    regards,
    maza

Maybe you are looking for

  • Ios7 push notifications and music

    this update is really starting to annoy me now. everytime i go on texts/whatsapp/kik/ anything it tells me to connect my phone to itunes to use push notifications.. so i connected to itunes and got load of songs i didnt want on my phone and no push n

  • WebService Call Fails for Communication Users

    Hi I am calling a BAPI through web service in VB.NET windows application. The application works fine with Dialog users but when I use Communication User then it thows this message. The Request Failed with HTTP Status 401: Unauthorized Where as if i c

  • My firefox browser closes when loading any page without a crash report

    My broswer keeps closing when loading. No crash report pops up, it just takes me to the "well this is embarrassing..." page that asks if I want to restore, to which no matter which option I pick it keeps closing on me.

  • Problem with lib32-glibc

    One file in my /lib is owned by lib32-glibc. It appears this library has not been updated in multilib yet, but only in multilib-testing. Is there any way to update my system or do I just have to wait until that goes to multilib? Also, why would they

  • My Folder is Missing

    Hi All, I am using OBI 11.1.1.5.0 and I create an Administrator user using Administration Console. User is created with the proper settings but somehow he doesn't have My Folder, I deleted and recreated and same thing keeps happening. Is there anyway