How to trim timestamp from a Date value

Hi,
Iam retrieving Date values from database(mysql). When i display these dates in a jsp ,those r displaying like this
2007-01-01 00:00:00.0
Actually we dont want that timestamp at the end of the date.
How can i trim that time stamp from date value.
We r using Hibernate to interact with database.
pls give some suggestions regarding this
thanks

Hi,
Iam retrieving Date values from database(mysql).
When i display these dates in a jsp ,those r
displaying like this
2007-01-01 00:00:00.0
Actually we dont want that timestamp at the end
of the date.
How can i trim that time stamp from date value.
We r using Hibernate to interact with database.
pls give some suggestions regarding this
thanksBy display, I assume you mean something like:
System.out.println(myDate)
or
System.out.println(myDate.toString()); // which is the same thingUse SimpleDateFormat class to format the date anyway you like.

Similar Messages

  • How to retrieve start and end date values from sharepoint 2013

    Hi,
    How to retrieve start and end date values from new event form of calendar in SharePoint foundation2013
    Thanks
    Gowri Balaguru

    Hi Srini
    Yes i need to have parallel flow for both and in the cube where my reporting will be on monthly basis i need to read these 2 master data and get the required attributes ( considering last/first day of that month as per the requirement).......but i am just wondering this is common scenario....while there are so many threads written for populating 0employee from 0person......don't they have such requirement.....
    Thanks
    Tripple k

  • How to handle dbms_xmldom with no data values.(no_data_found error in dom)

    hi,
    i have below block,
    DECLARE
    doc dbms_xmldom.DOMDocument;
    node dbms_xmldom.DOMNode;
    elem dbms_xmldom.DOMElement;
    cur_node dbms_xmldom.DOMNode;
    root_elem_data dbms_xmldom.DOMElement;
    root_elem_tab dbms_xmldom.DOMElement;
    root_node_data dbms_xmldom.DOMNode;
    mode_elmn dbms_xmldom.DOMElement;
    mode_node dbms_xmldom.DOMNode;
    mode_text dbms_xmldom.DOMText;
    doc1 DBMS_XMLDOM.DOMDOCUMENT;
    root_node_data1 DBMS_XMLDOM.DOMNODE;
    child_document DBMS_XMLDOM.DOMDOCUMENT;
    child_rootnode DBMS_XMLDOM.DOMNODE;
    V_CLOB CLOB;
    v_doc CLOB;
    v_EMP CLOB;
    v_output_filename VARCHAR2(300) := 'SPOOL_DIR/'||'EMP_XML_FILE.xml';
    l_xmltype XMLTYPE;
    BEGIN
    doc := dbms_xmldom.newDOMDocument;
    node := dbms_xmldom.makeNode(doc);
    dbms_xmldom.setversion(doc, '1.0');
    dbms_xmldom.setCharset(doc, 'UTF8');
    elem := dbms_xmldom.createElement(doc, 'PartnerInfo');
    dbms_xmldom.setAttribute(elem,'xmlns','EMP');
    cur_node := dbms_xmldom.appendChild(node, dbms_xmldom.makeNode(elem));
    mode_elmn := dbms_xmldom.createElement(doc, 'EMPLOYEE');
    mode_node := dbms_xmldom.appendChild(cur_node,dbms_xmldom.makeNode(mode_elmn));
    BEGIN
    SELECT value(e) INTO l_xmltype
    FROM TABLE(XMLSequence(Cursor(SELECT * FROM EMP1 where EMPNO=7501))) e;
    child_document := DBMS_XMLDOM.newDOMDocument(l_xmltype);
    root_node_data1 := dbms_xmldom.importNode(doc,dbms_xmldom.makeNode(dbms_xmldom.getDocumentElement(child_document)),TRUE);
    root_node_data1 := DBMS_XMLDOM.appendChild(root_node_data, root_node_data1);
    EXCEPTION
    WHEN OTHERS THEN
    Dbms_Output.Put_Line('Error in SELECT stmt(UC_PARTNER_MS):::'||'error::'||SQLERRM);
    END;
    dbms_lob.createtemporary(v_doc, true);
    dbms_xmldom.writeToClob(doc,v_doc,'UTF8');
    v_EMP:= v_doc;
    dbms_xmldom.writeToFile(DOC,v_output_filename,'UTF8');
    dbms_xmldom.freeDocument(doc);
    --Dbms_Output.Put_Line('THE OUTPUT IS::'||V_EMP);
    EXCEPTION
    WHEN OTHERS THEN
    Dbms_Output.Put_Line('Error in SELECT stmt(UC_PARTNER_MS):::'||'error::'||SQLERRM);
    END;
    The xml file is 'EMP_XML_FILE.xml'
    <empno>U++kYmcVuGchxbh+++++++++++++++1+</empno>
    <empname>J</empname>
    suppose the empno 7501 is not available in our emp table,
    i got error
    ORA-03113: end-of-file on communication channel
    how to handle xmldom with no data values.
    by
    siva

    hi,
    please give the solution
    by
    siva

  • How to avoid the Amount and Date values for VOID Cheques

    Hi All,
    I had created a two window i.e For Amount and Date. If I process the cheque the Amount value and Date should not trigger for VOID CHEQUES.
    Can any one tel me how to avoid the Amount and Date values for VOID Cheques
    Your help will be greatly appreciated.
    Regards
    Yathish

    Hi,
    I dont know which tablel you are referring to, is it PAYR table and the field VOIDR?
    If a cheque is voided, it would have a reason and it is stored in VOIDR field of this PAYR table.
    Check if the field VOIDR is filled, if it is filled, do not print the amount and date.
    Regards
    Subramanian

  • How to import timestamps from excel into labview

    hello everyone, how to import timestamps from a column in excel into labview?
    I am bugged with this problem for long now... can anyone help please?
    Now on LabVIEW 10.0 on Win7

    LV and Excel use a different reference time (LV was 1.1.1904?). You need to convert between both references. I don't remember the details how I did it and I'm away from my code base.
    Felix
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml

  • How to select 2column from 1 column values

    Hi All,
    How to select 2column from 1 column values
    Ex : In Emp they have JOB column
    JOB
    CLERK
    MANAGER
    SALESMAN
    MANAGER
    MANAGER
    ANALYST
    PRESIDENT
    SALESMAN
    CLERK
    CLERK
    ANALYST
    CLERK
    here i want to get output like as follows
    Ex: ejob1 ejob2
    ANALYST SALESMAN
    ANALYST SALESMAN
    Can anyone helps me in this,it is urget
    Thanks,

    Something like
    select a.job, b.job from scott.emp a, (select job from scott.emp) b
    CLERK     CLERK
    CLERK     SALESMAN
    CLERK     SALESMAN
    CLERK     MANAGER
    CLERK     SALESMAN
    CLERK     MANAGER
    CLERK     MANAGER
    CLERK     ANALYST
    CLERK     PRESIDENT
    CLERK     SALESMAN
    CLERK     CLERK
    CLERK     CLERK
    CLERK     ANALYST
    CLERK     CLERK
    SALESMAN     CLERK
    SALESMAN     SALESMAN
    SALESMAN     SALESMAN
    SALESMAN     MANAGER
    ...

  • How create temporary table from list of values

    Can you anybody advise me how can I create temporary table from list of values? I have list of values and need create temporary table for next use with command JOIN etc.
    Thank you for help

    NO, you can not create temporary table in oracle on the fly ( Like #Tabels in SQl Server or Sybase ) , you will have to use the GTT i.e Global Temporary Tables
    check the following link GTT :
    to flush the tables after commit
    CREATE GLOBAL TEMPORARY TABLE my_temp_table (
      column1  NUMBER,
      column2  NUMBER
    ) ON COMMIT DELETE ROWS;In contrast, the ON COMMIT PRESERVE ROWS clause indicates that rows should be preserved until the end of the session.
    so to keep rows in Table after commit
    CREATE GLOBAL TEMPORARY TABLE my_temp_table (
      column1  NUMBER,
      column2  NUMBER
    ) ON COMMIT PRESERVE ROWS;

  • How to trim spaces from string in BMM layer?

    Hi friends,
    I need to trim spaces from the string. can you please give me syntax with example.
    Thanks

    Hi
    I have tried the below option , but it did not work . PS_D_PERSON
    PERSON_ID is char type in the data base oracle , and it is defined as varchar on the physical layer .
    So the table is loaded with space , i am not able to remove the space using trim both
    Thanks
    Sridhar.N

  • SAP BPC 10 NW loading data from Infoprovider (data value issue in BPC)

    Hi Experts,
    We are on SAP BPC 10 - 801 NW - SP05
    We are having an error when loading data from infoprovider, we tested in DEV and QA and have similar behaviour: data values which are stored  in infoprovider are loaded into BPC model with no differences.
    However after make a transport procedure into PROD environment and then loading data  into BPC Model something happens: suppose that 100,00 is a data value stored in a BW infoprovider, after loading data into BPC from this infoprovider, different data value is loaded into BPC. E.G 100,0 is in BW , but 10000,0 is store in BPC
    Is there any idea to fix it or check it?
    Thanks for your answer

    Hi Giovanni,
    This case occurs with colombian currency and others.
    Compare the table TCURX in DEV, QA and PRD.
    There must be an entry for currency COP only in PRD.
    Like
    CURRKEY CURRDEC
    COP 0
    Note 1240163 explain this behavior.
    If you need the value to be stored in 100,00 format in BPC, you can create a routine to convert this value.

  • With multiple iPhones and iPad, how do you keep from downloading data from one device to another? ie, my calander ended up on my daughter's iPad.

    With multiple iPhones and an iPad, how do I keep from downloading info from one device to another? All of my info, example my calendar, ended up on my daughter's iPad.

    Each device has its own sync preferences with iTunes when syncing multiple devices with the same iTunes library under the same computer login account.
    If sync calendars with the same calendar is selected under the Info tab for your daughter's iPad sync preferences with iTunes, the same calendar will be synced with her iPad.

  • How to show timestamp along with date in LOV dropdown

    Hi,
    We have a requirement to show timestamp along with date as a display column in a LOV drop down. Type of the date column in VVO is set to timestamp. But still it is showing only date in the UI.
    But it is showing timestamp when we run it through AM. Is there any thing in to do in addition to display it in UI? Or it is not feasible? Please suggest me on this issue.
    Thanks in advance.
    Thanks,
    Santhosh

    The date format displayed in UI depends on applcore preference set for current user, try changing date format set for current user to include time along with date.

  • How to take timestamp from Transmitted CAN frame ?

    Hello,
    Timestamp from Received CAN frame is simply get as...
    NCTYPE_CAN_STRUCT *RxFrame 
    ... RxFrame->Timestamp ...
    For Transmitted frame I use: 
    ncGetAttribute(hCan, NC_ATTR_ABS_TIME, 8, &TxTime);
    ncWrite(hCan, sizeof(Transmit), &Transmit);
    But sometimes timestamp of Rx frame is BEFORE Tx timestamp ?!?!?!
    Is there any other way to get real Tx frame timestamp  - not by ncGetAttribute(...) ?
    Thank you in advance
    Petko G.

    you would need to set the interface into the Self-reception mode.
    Self-reception specifies whether to echo successfully transmitted CAN frames as received frames. Each reception occurs just as if the frame were received from another CAN device. The self reception mode is not available on the Intel 82527 CAN controller
    used by Series 1 CAN hardware. 

  • Flash Builder 4 List controls trimming spaces from XML node values

    I'm trying to migrate my Flex 3 application to Flash builder 4.  One issue that I have is that one of my datasources returns a list of cities and regions.  To get the regions to display in the correct order in Flex 3, a space was added to to their name in the database (ie. "West", "Northwest" are stored in the database as " West" and " Northwest" so that when sorted by the sql query they would appear at the top and gets translated to XML to fill in a list box or combo box in my Flex 3 application.  I have functions that take that selected city or region value from the combo box and queries the database for various performance metrics.  In migrating to Flash Builder 4, I noticed that the spaces in the region names no longer appear in the combo boxes.  When I show the data in a datagrid, the spaces are still there but when populating a combo box or list box, the leading space gets trimmed.  This is an issue since if a user selects the value "West", it doesn't find it in the database since it is listed as " West".  This wasn't an issue in Flex Buider 3.  Is there a work around or parameter that I can set to force the combo box or list box to show the data as-is versus having it trim off the leading spaces for my regions?
    Also, a stupid question, in Flex 3, you were able to find the select value of a combo box by using comboBox.text.  What is the equivalent in Flash Builder 4?  Do I need to do comboBox.selectedItem.Region.toString() now or is there a shortcut to pull the text from the combo box?

    I think you want this:
    private function onLoadPortfolioData(event:ResultEvent):void
        var obj:XMLList = event.result.img as XMLList;
        if (obj.length > 0)
            _imgCollection = new XMLListCollection(obj);
            pictureList.dataProvider = _imgCollection;
    If this post answers your question or helps, please mark it as such. Thanks!
    http://www.stardustsystems.com
    Adobe Flex Development and Support Services

  • How to track that, from Where the value is EXPORTing to MY_MEMORY_ID

    Hello,
    Previous programmer is IMPORTing some value into a variable from MY_MEMORY_ID, fine, this is happening in a Customer- Function of Purchase Req.
    But, I do not know, From where he is EXPORTing that value? pls. let me know, How to track/How to know from Where he is EXPORTing?
    I hv seen any comments/documentation of that user exit, I hv searched GLOBALLY for that memory ID in PO prog./Purchase Req. prog./Sales order prog!! but, did not find it!!
    Is there any table to store this data(EXPORT/IMPORT), i do not think so!! bcoz, its run time/buffer!!
    thank you

    thank you.
    After coming to home, I got the same thought.....again thout that, there might b 2 concerns, like,
    1 - we put these memory IDs in SINGLE quotes, like "MY_MEMORY_ID", so, in this case, that std. SAP prog. is really scans?
    2 - this client SAP system is a Monster!! so, i do not know, is it goes to outtage!!
    thank you

  • User Defined field in UDT - how to create select from existing data

    Hi
    I want to create User Defined Table for purpose of storing records of sales visits made to customers.
    I want to record detail for example: Date of Visit; Sales Employee; Activity number ref (which has attached PDF visit report); Related Opps)
    I am not sure exact detail as I have never created User Defined Table before so I am not sure how best to achieve my requirement.
    But I want one of the fields to be Business Partner code.
    My question is How should I set the BP field so that available options are existing Business Partner codes?
    I would like to set field so that if I enter for example:
    "CAQ"... and I click Tab key then SAP will bring list of BP Codes which begin with CAQ (eg. CAQU001; CAQF001 etc) for my selection.
    Is this possible?
    Regards,
    Karen

    hi.
    u can create a user defined table enter your values..by creating columns like..
    Customercode, customer name, vitst time, attachnment.
    but
    "CAQ"... and I click Tab key then SAP will bring list of BP Codes which begin with CAQ (eg. CAQU001; CAQF001 etc) for my selection.
    above one u can not do it..
    all the cutomer codes will come if u use coding........are u can filter as per ur requirement
    else
    if u say i  am not using the coding..
    u can get all the  business master codes... but u have to use fms  u have to put it..otherwise u can not do it...

Maybe you are looking for

  • Can not color label more than one file at a time

    Hi, I've had this problem since 10.6.6-ish, i can not color label more than one file at a time in the Finder. Wether i select two, twenty or twohundred only one file gets color labeled. It doesn't seem to matter if i assign a color label through the

  • Setting up family sharing with new Apple ID

    I have an apple ID with lots of music and apps on it.  When my son (14) got an iPod Touch, we set it up using my apple ID so that he could access all the music and games I had already purchased without buying them again.  We then associated his own e

  • Accounts Verification Center Nightmare. Service Suspended. No Explanation. HELP.

    Yesterday, 9/26, at around 12pm I was trying to access my account to pay my Verizon bill for my internet and TV service. Through multiple attempts I was getting the prompt that my account could not be accessed and so I called technical support and wa

  • New interal Hard drive and Lion

    I have a Mac Pro early 2008 which is working just fine except that the original hard drive is starting to show it's age. To mitigate the potential problem I have a new clean,empty internal hard drive and wonder if installing Lion on it would be a wis

  • How to query on multiple fact tables ?

    Hello all, I know this is a recurring subject around here. I have read various topics and tried many thing but I couldn't reach my goal : I want to query a BMM with 6 fact tables that all have common dimensions. For instance, I have Invoices facts, S