Modify date field

Hi
I am trying to subtract date fields on oracle 7 database. It is giving me the result as days but I need to have it as day-mon-yyyy hh:mi:ss.
The query is as folllows
select (table2.date2) - (table1.date1) from date2,date1 where table1.order_id = table2.order_id and table1.accession=0110500001 and table2.ord_pend_type_cd = 12300
Both of the date filelds are in Date data type
Some body could help me on this.
Chowdhury

<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by MD Chowdhury ([email protected]):
Hi
I am trying to subtract date fields on oracle 7 database. It is giving me the result as days but I need to have it as day-mon-yyyy hh:mi:ss.
The query is as folllows
select (table2.date2) - (table1.date1) from date2,date1 where table1.order_id = table2.order_id and table1.accession=0110500001 and table2.ord_pend_type_cd = 12300
Both of the date filelds are in Date data type
Some body could help me on this.
Chowdhury
From the search, it only returns two matches and it didn't help me. It talked about how to return as day but I need to know how to get days as well as hour, min,ss, month,yy.
Somebody could help me on this
<HR></BLOCKQUOTE>
null

Similar Messages

  • Looking for a third party utility to replace a file's "modified Date" field

    For video files, apparently the organizer displays the thumbnails with the date taken from the file's "modified date" field. For some wierd reason (which I'm discussing with Adobe CS) the organizer changed the date of all my videos in the "modified date" field, so now the chronology of all my video clips in the organizer went down the drain.
    Is there a third party utility to replace the "modified date" field of a file with the original shot date? (which in W7 is shown in the "Date" field).
    In other words: for every video file in my library, I want to take the date from the "Date" field and put it in the "Modified Date" field
    Thanks for your help.

    OK thanks.
    I've found a utility that modifes several of the date fields.
    Now, I just want to be sure that I don't screw this up...
    Which of the several date fields of a file holds the actual shot date?
    Which of the date fields is used by the organizer to "organize" the video files (avi and mov's) chronologically?
    Thanks for your help

  • Does Address book has a Last Modified Date field?

    Hi
    Please can you let me know if Address book has a Last Modified Date field? I'd like to know what date I have last modified my address book records. I checked Preferences but not able to find it there.
    Thank you.

    Sorry, but there is no such field in Address Book. If you select an individual entry in Address Book, you will see to the lower-right an "Updated" field with the date that entry was last updated. This is not true for all entries, but nearly all. There seems to be a point after which you've entered text in the Note field that the "Updated" field will no longer appear when you select an entry, but it's not documented.

  • How to modify Date fields in Canada- ROE

    Hi Experts,
    I have a requirement to change the Block 10 ( First day worked)  and Block 11 (Last day for which paid)  logic in the ROE letter in Canada Payroll.
    Can anyone please let me know how to customize the ROE fields in Canada payroll.
    Thanks in advance,
    Saurabh

    use CMOD
    tcode if u want to change feild Label
    can u be some wht little clear

  • Problem with displaying Date field in the table.

    Hi All,
    I am trying to display data into a table UI Element. 
    In that data, i have one DATE type field. While displaying data in DATE field, it will display like this "01.02.2009".
    Now my requirement is if i want to modify that DATE field, it will allow to modify "01.02.2009"  to "26.02.2009".
    But while modifying DATE field , I want to show the Calender of that month, in that i  have to select the another date.
    (Like normal Date UI Element will show that calender).
    Can anyone please help me.
    Thanks in Advance!
    Regards,
    Sreelakshmi.

    Hi,
          Go to the context attribute that was mapped to the DATE field of the table and change the perperty INPUT HELP MODE to  AUTOMATIC and it works.
    Regards,
    Manne.

  • "Modified By" Field Value is same "Created By" field value after the workflow completion.Sp 2010 workflows

    Hi All,
    I have a work flow A attached to List List1
    I have Added an item(now created by and modified by are same)
    Next Person B modified
    Ideally created by value and modified by value should be different, but they are same after the workflow completion
    This is very strange as i am not modifying  modified by field any where
           Please let me know any one has faced similar problem
    Thanks
    Ravi
    Ravi

    The workflow will run as the person who initiated it. As such if the workflow starts when an item is created then it'll be running as the user who created the item.
    When the workflow changes anything the 'modified by' field will be updated to show the identity the workflow is running under. I think that explains your behaviour?
    To change it you could use an impersonation step but that would simply replace one name with another. I don't think you've got access to the 'SystemUpdate()' method in workflows which would allow you to avoid updating the modfiied by and modified date fields.

  • What HFM Table contains the Hyperion Financial Reporting Modify Date

    Does anyone know the name of the HFM table that contains the Hyperion Financial Reporting Modify Date field of a Report?
    Thanks!
    Edited by: user2609991 on Sep 1, 2009 8:49 AM

    1. no "HFM Table" stores any information about Financial Reporting reports. Financial Reporting is part of the "BI+" / "Reporting and Analysis" product, so if there was any information to be found in a relational database, it would be in the BI+ schema not the HFM one.
    2. Oracle / Hyperion do not support customers trying to build their own relational database integrations directly into product repositories. To interact with the BI+ product (e.g. to extract modified by dates of FR reports) you should read up on the API and write custom code using that API. More information can be found in the Developers Guide here http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/hs_developer.pdf and in the "javadoc" documentation that comes with the BI+ product.

  • How to autofill the Modified Date And Modified User?

    hi All,
    Below is the screenshot of my form , if we look at the last 4 columns we have Created Date,Created User Id which is popped up automatically if a new entry is being created. Now if we look at the last 2 ModifiedDate and ModifiedUserId those fileds will be
    empty wile creating a new entry which is good for me. But lets say if i go back to any existing record and want to modify it then the modified date and modified userid must be popped up with that persons name and current date. I think i can use the logic i
    have to get date and userid but i want some help with code to how to make the modified fields fill up.
    Can someone please help me with this?
    Thanks a lot for all your time and support.

    well I use it all the time, and have no problem in that initially both the 'started' and the 'modified' date fields have the same value..... because when one is editing a record whether initially putting in data or adding/changing later - they are both considered
    to put the form in a dirty state.
    then in future edits only the modified date field changes.  the code in the OnDirty event is:
    me.ModifiedDateFieldName=Now()
    any other approach will be more difficult to achieve as essentially one must trigger it not universally at the OnDirty event but something more specific such as at every control

  • Modify the text of a data field on the screen

    Hi,
    I am looking to change the text of a  SAP data field on the display screen for an infotype 106. I have the required object key for it. When I entered the key it logged me successfully, however it displayed a message that I am not authroized for changes. Infact as a developer my user profile has the highest authroization level 'SAP_ALL'.
    I am looking to modify the module pool MP010600 and screen number 0100 on the infotype screen 106.
    It displays the message:
    "you have no authroizations for the authroization object 'S_DEVELOP' which would allow you to change the screen'. I checked with the admin guy. He did not have a clue either. Am I missing something?
    Any thoughts how to resolve it?
    It would be very helpful.
    Thanks in advance,
    VG

    Thread closed.

  • MOdify with Date field giving error

    Hi,
    I have to modifuy an internal table using modify statement.
    After using the modify statement my date field in the internal table is replace by *.
    heres a sample code i have used to depict the scenario(with the test values:)
    DATA: BEGIN OF t_arcs_source OCCURS 0,
          premise(10) type c,
        key_date TYPE sy-datum,
      END OF t_arcs_source.
      DATA: wa_arcs_source LIKE LINE OF t_arcs_source.
    t_arcs_source-premise = '1001'.
    t_arcs_source-key_date = '20080101'.
    APPEND t_arcs_source.
    t_arcs_source-premise = '1001'.
    t_arcs_source-key_date = '20090101'.
    APPEND t_arcs_source.
      sort t_arcs_source by premise ascending key_date descending.
      clear t_arcs_source.
      loop at t_arcs_source into wa_arcs_source.
        at new premise.
           modify t_arcs_source from wa_arcs_source transporting key_date where premise = wa_arcs_source-premise.
        endat.
      endloop.
    please test the code and see the  error and help me out.
    Regards,
    Anand

    Hi.
    I have modify ur above given code and make it changed for ur need meanz according ur nedd and it is working accurately.
    check it and then tell me.
    DATA: BEGIN OF t_arcs_source OCCURS 0,
          premise(10) type c,
        key_date TYPE sy-datum,
      END OF t_arcs_source.
    " New code of loines i appended
      data: wa_t_arcs_source like t_arcs_source.
      data: t_arcs_source_1 LIKE STANDARD TABLE OF t_arcs_source WITH HEADER LINE.
      data: wa_t_arcs_source_1 like t_arcs_source.
    " End of new code of line
      DATA: wa_arcs_source LIKE LINE OF t_arcs_source. " I change this work area by wa_t_arcs_source
    t_arcs_source-premise = '1001'.
    t_arcs_source-key_date = '20080101'.
    APPEND t_arcs_source.
    t_arcs_source-premise = '1001'.
    t_arcs_source-key_date = '20090101'.
    APPEND t_arcs_source.
      sort t_arcs_source by premise ascending key_date descending.
      clear t_arcs_source.
      loop at t_arcs_source into wa_t_arcs_source. " Used the new work area
        wa_t_arcs_source_1 = wa_t_arcs_source.
        append wa_t_arcs_source_1 to t_arcs_source_1.
        at new premise.
           modify t_arcs_source_1 from wa_t_arcs_source_1 transporting key_date where premise = wa_t_arcs_source-premise.
        endat.
      endloop.
    Just copy paste in editor and check it.
    Edited by: tahir naqqash on Feb 2, 2009 11:24 AM

  • Reportable Last Modified Date and Time Field

    Reportable Last Modified Date and Time Field
    Hello,
      We need a reportable RequestCenter 'last modified date/time' database field that is refreshed when the 'Comments and History' field is updated.  Any ideas would be appreciated.  Thanks! 

    No, unless you can use an FTP client.

  • HOW TO CREATE A TRIGGER TO UPDATE A DATE FIELD WHEN RECORD IS MODIFIED

    Hi,
    I have a field (column)
    SalesLeadLastModifiedDate
    in the table
    SalesPipeline
    A record's field (SalesLEadLastModifiedDate) should be updated with current date and time every time any column in a record is modified. I'm new to SQL and can't figure out how to write this trigger. Could someone help me and also
    refer literature that would give me independence? Online MSDN language without matching examples is not helping.
    Tnx.,
    IJ

    Break it down into pieces.  Write a small script that updates some small (but more than 1) number of rows.  After updating the rows, write another update statement that will set your modified date column to the current date and time.  Once
    you have that working, you can easily convert that into a trigger.  Pseudo-code would be:
    begin tran;
    select * from dbo.SalesPipeline where SalesPipelineID in (45, 76);
    update dbo.SalesPipeline set <some column> = <something> where SalesPipelineID in (45, 76);
    update dbo.SalesPipeline set <your date colum> = ?? where SalesPipelineID in (45, 76);
    select * from dbo.SalesPipeline where SalesPipelineID in (45, 76);
    rollback tran;
    Notice the transaction control statements.  This will allow you to run the script, evaluate the result, and then revert all changes (leaving your database unchanged).  In turn, this will allow you to run the same script over and over and over again
    and achieve (for the most part) the same results with each execution.  You can search the forums for examples of trigger code - just beware that many "solutions" are not necessarily well-written.

  • CRVS2010 beta - Date field from database does not display in report

    Hi there - can someone please help?!
    I am getting a problem where a date field from the database does not display in the report viewer (It displays on my dev machine, but not on the client machines...details given below)
    I upgraded to VS 2010
    I am using the CRVS2010 Beta
    My development machine is Windows 7 - and so is my fellow developer's
    We are using Microsoft SQL Server 2000
    We run the queries within VS and then we send the data table to VS using .SetDataSource
    We have a few reports which display the date on our dev machines (whether we run the EXE or from within Visual Studio)
    When we roll out to the client machines (running Windows XP SP3) then everything works, except that the date does not display (on quite a few reports)
    This is the only real issue I have had - a show stopper for me
    The rest works well - any input will be greatly appreciated
    Regards,
    Ridwan

    Hi Ridwan,
    After much testing I have it all working now using CRDB_adoplus.dll as a data source ( XML )
    Alter your Config file to look like this:
    <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"/>
    </startup>
    Then using the code below, and CR requires the Schema to be able to read the date format.
    private void SetToXML_Click(object sender, EventArgs e)
    CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
    ISCDReportClientDocument rcd;
    rcd = rptClientDoc;
    string connString = "Provider=SQLOLEDB;Data Source=dwcb12003;Database=xtreme;User ID=sb;Password=password";
    string sqlString = "Select * From Orders";
    OleDbConnection oleConn = new OleDbConnection(connString);
    OleDbDataAdapter oleAdapter = new OleDbDataAdapter(sqlString, oleConn);
    //OleDbDataAdapter oleAdapter2 = new OleDbDataAdapter(sqlString2, oleConn);
    DataTable dt1 = new DataTable("Orders");
    oleAdapter.Fill(dt1);
    System.Data.DataSet ds = new System.Data.DataSet();
    // We need the schema to get the data formats
    ds.WriteXml("c:
    sc.xml", XmlWriteMode.WriteSchema);
    //Create a new Database Table to replace the reports current table.
    CrystalDecisions.ReportAppServer.DataDefModel.Table boTable = new CrystalDecisions.ReportAppServer.DataDefModel.Table();
    //boMainPropertyBag: These hold the attributes of the tables ConnectionInfo object
    PropertyBag boMainPropertyBag = new PropertyBag();
    //boInnerPropertyBag: These hold the attributes for the QE_LogonProperties
    //In the main property bag (boMainPropertyBag)
    PropertyBag boInnerPropertyBag = new PropertyBag();
    //Set the attributes for the boInnerPropertyBag
    boInnerPropertyBag.Add("File Path ", @"C:\sc.xml");
    boInnerPropertyBag.Add("Internal Connection ID", "{680eee31-a16e-4f48-8efa-8765193dccdd}");
    //Set the attributes for the boMainPropertyBag
    boMainPropertyBag.Add("Database DLL", "crdb_adoplus.dll");
    boMainPropertyBag.Add("QE_DatabaseName", "");
    boMainPropertyBag.Add("QE_DatabaseType", "");
    //Add the QE_LogonProperties we set in the boInnerPropertyBag Object
    boMainPropertyBag.Add("QE_LogonProperties", boInnerPropertyBag);
    boMainPropertyBag.Add("QE_ServerDescription", "NewDataSet");
    boMainPropertyBag.Add("QE_SQLDB", "False");
    boMainPropertyBag.Add("SSO Enabled", "False");
    //Create a new ConnectionInfo object
    CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo boConnectionInfo =
    new CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();
    //Pass the database properties to a connection info object
    boConnectionInfo.Attributes = boMainPropertyBag;
    //Set the connection kind
    boConnectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;
    //*EDIT* Set the User Name and Password if required.
    boConnectionInfo.UserName = "";
    boConnectionInfo.Password = "";
    //Pass the connection information to the table
    boTable.ConnectionInfo = boConnectionInfo;
    //Get the Database Tables Collection for your report
    CrystalDecisions.ReportAppServer.DataDefModel.Tables boTables;
    boTables = rptClientDoc.DatabaseController.Database.Tables;
    //For each table in the report:
    // - Set the Table Name properties.
    // - Set the table location in the report to use the new modified table
    boTable.Name = "Orders";
    boTable.QualifiedName = "Orders";
    boTable.Alias = "Orders";
    rptClientDoc.DatabaseController.SetTableLocation(boTables[0], boTable);
    //Verify the database after adding substituting the new table.
    //To ensure that the table updates properly when adding Command tables or Stored Procedures.
    rptClientDoc.VerifyDatabase();
    MessageBox.Show("Data Source Set", "RAS", MessageBoxButtons.OK, MessageBoxIcon.Information);
    Thanks again
    Don

  • Creating process for multiple Date fields for update or insert in APEX

    hello there,
    could someone please help me?
    i have a form on Apex based on view that is based on three tables and updating and inserting ok using trigger instead of.
    i have a problem now as in my form i have around 75 fileds (items) incuding 30 or more date fields which could be populated or left blank or update later.
    so for each date field i have two boxs; one for date, input as dd/mm/yyyy (text field) and second for time, input as 23:45. All dates will be insert or update manually by user. so as i mentioned not all date fields could be poulated at one stage.
    so i have created some process and validations and all of them work fine but i came accross if date left blank then (:) giving me problem so i have done following further process for each date field. In real table all the date fields have data type date.
    declare
    v_my_var date; -- for first date field
    str_dy VARCHAR2(10);
    dt_indx date;
    str_tm VARCHAR2(20);
    tm_indx date;
    begin
    str_dy := :p4_first_date
    str_tm := str_dy||' '||substr(:p8_first_date_hh,1,2)||':'||substr(:p8_first_date_HH,4,2);
    dt_indx := to_date(str_tm,'DD/MM/YYYY HH24:MI');
    IF str_dy is not null then
    v_my_var :=dt_indx;
    ELSE
    v_my_var := NULL;
    END IF;
    update table 1 set my_date = v_my_var where d_id= :p4_d_id;
    end;
    above code work fine but one date field of course therefore i have to do same code for each date field with changes and initialise variable again and again for each field.
    so i like to ask is there any easy way that is more professional. i was thinking about the procedure and using collection or similar but honestly not much experience on that so could some one please help me?
    I will be very thankful.
    KRgds

    Hi,
    You can do the needful by re-using the code if you can give the item names as P8_DATE1, P8_DATE_hh1, P8_DATE2, P8_DATEhh2 etc..So your item name just differs by a sequence.
    Now you write function which will return desired date value taking above items as input. Pass item names to this function, get session state using APEX_UTIL.GET_SESSION_STATE('item_name') API.
    Now modify you code as
    FOR i IN 1..30
    LOOP
    v_date_array[i] = f_get_date('P8_DATE'||i, 'P8_DATEhh'||i);
    END LOOP;
    ....Now you have all date valus in array. Just write one update as follows
    UPDATE  TABLE1
    SET date1 = my_date_array[1], date2 = my_date_array[2]..
    WHERE ....Hope it helps :)
    Cheers,
    Hari

  • Javascript for multiple date fields

    Hi all-
    I have to write javascript for 15 different date fields in a form.
    The requirement here is that we convert all date fields on Page 100 from date pickers (editable date fields) to display-only date fields with two controls for the users to set the date.
    If the field is empty (no date registered yet), there will be a green checkmark(X). When the user clicks this checkmark, the current date is entered into the field.
    If the field is not empty (there is a date already in the system), there will be a red X. When the user click this red X, the date from the date field is removed.
    The javascript I am using here is
    </script>
    <script type="text/javascript">
         function init(){
              var datePickerVal = $v2('P100_TODAYS_DATE');
              if(datePickerVal){
                   $x_Show('ToggleDateR');
                   $x_Hide('ToggleDateG');
              }else{
                   $x_Hide('ToggleDateR');
                   $x_Show('ToggleDateG');
         function toggleDateFunc(pValue){
              var sysDate = $v2('P100_DATE');
              if(pValue == 'R'){
                   $x_Hide('ToggleDateR');
                   $x_Show('ToggleDateG');
                   $x_Value('P100_TODAYS_DATE','');
              }else if(pValue == 'G'){
                   $x_Show('ToggleDateR');
                   $x_Hide('ToggleDateG');
                   $x_Value('P100_TODAYS_DATE',sysDate);
         window.onload = init;
    </script>
    This javascript is working for one date field( 'P100_TODAYS_DATE') but i have 15 different date fields in this page(100) all should have same funtionality. Please help me out how to write a logic to use this function for all the date fields.
    Thanks,(apex 3.2)
    Greenhorn
    Edited by: Greenhorn on Jul 19, 2011 12:30 PM

    Hi,
    You can do the needful by re-using the code if you can give the item names as P8_DATE1, P8_DATE_hh1, P8_DATE2, P8_DATEhh2 etc..So your item name just differs by a sequence.
    Now you write function which will return desired date value taking above items as input. Pass item names to this function, get session state using APEX_UTIL.GET_SESSION_STATE('item_name') API.
    Now modify you code as
    FOR i IN 1..30
    LOOP
    v_date_array[i] = f_get_date('P8_DATE'||i, 'P8_DATEhh'||i);
    END LOOP;
    ....Now you have all date valus in array. Just write one update as follows
    UPDATE  TABLE1
    SET date1 = my_date_array[1], date2 = my_date_array[2]..
    WHERE ....Hope it helps :)
    Cheers,
    Hari

Maybe you are looking for