Cumulation of time data field

Hi experts,
I have a problem in my program , in internal table am getting different time data .
eg : 1st  row 011000
       2nd       001000 
       3rd        091000
      like this am getting some records i want add this all records as one record but this field type is tims , can't add in sum . am trying to add it to a variable type time but it is allowing me to add upto 24:00:00 only. if i take a char type there am getting again conversion problem.
can anyone please help me in this regard it is very urgent.
awaiting for u r reply.
Regards,
Vasu

Hi Vasu,
Check the below logic.
data : begin of g_t_times occurs 0,
        time type sy-uzeit,
       end of g_t_times.
data : l_diff type p.
data : l_total type p.
data : l_default type sy-uzeit value '000000'.
data : l_hours type i.
data : l_mins  type i.
data : l_sec type i.
start-of-selection.
  g_t_times-time = sy-uzeit - 3.
  append g_t_times.
  g_t_times-time = '123107'.
  append g_t_times.
  g_t_times-time = sy-uzeit + 4.
  append g_t_times.
  loop at g_t_times.
      l_diff = g_T_times-time - l_default.
      l_total = l_total + l_diff.
   endloop.
* Get Hours/Minutes/Seconds
  l_hours = trunc( l_total / 3600 ).
  l_total = l_total - l_hours * 3600.
  l_mins = trunc( l_total / 60 ).
  l_sec = l_total - l_mins * 60.
  write : / l_hours, / l_mins, / l_sec.
Hope this is helpful.
Thanks,
Pavan

Similar Messages

  • Time/Date Field Not Returned in PDF

    I have created a very simple form in LiveCycle Designer 8.0. The form enables the user to input data into columns labeled "name," "change type," and "change date." I used the date/time object for the "change date" row fields.
    When my testers (using Acrobat 7.0) email the saved form back to me, all of the fields are populated with the information they entered, except the "change date" column fields. I asked if they used the flyout calendar or typed in the date manually, and all used the calendar.
    Is this a compatibility issue, or is there something I need to do to bind the chose value to the field when the form is saved?

    The issue with the time portion of date field not displaying in Data tab of a Table window has been posted before - see date format while browsing data
    I still get the problem in v1215 connecting to either 9i or 10g databases. Note that this problem does not happen in the SQL Worksheet results area, so simply querying the table data with a select doesn't test this.
    As for Ctrl-C, Ctrl-V changing the date format to MM/DD/YYYY HH24:MI:SS when copying data out of the SQL Worksheet Results - I also still get this in v1215.

  • CR seems remember last time data field length

    Hi.Everyone:
    Is there anyone have a problem when I use CR 2008 to preview XML data.
    If I preview a field (ex:name "abcde"), then save it .
    Next time when I open template with name field change to "crystalreport"
    CR template will only display first five character i.e "cryst"
    So what's wong? any option controls this?
    If anyone have a solution. It'll be really appreciated.
    Regards
    Johnny

    It seems doesn't work. "Can Gow" Option let you extend the frame size  if data is more  bigger than the frame. but with my case.
    Even data is short than the frame . It still doesn't show up..
    Anyone else have any idea? or it's because XML driver characteristic?
    so now every time before I save, I have to read a XML file with all field filled with data in maximum length.
    It's really bothering..
    Johnny

  • Still on the inclusion of the time/date field into the spreadsheet file, with 2 real values?

    I have tried to convert the 2 real values to decimal strings, and then taken these 2 values, as well as the date/time strings, put it into an array, converted the array to decimal number, and plugged it into the 1D input of the spreadsheet vi. However, for the date and time, i get the first part only, in a decimal.i.e,for 12:30pm-->12.0000 and for 23/04/2001-->23.0000.
    How can i get the right values, show me an example if u can.
    Thanks.

    1- Open write to spreadsheet file vi.
    2- Save a copy as "Write string array to spreadsheet.vi" or something.
    3- Open this copy.
    4- Replace the numerical controls in the 1D and 2D arrays with string controls.
    5- Save this vi
    6- Now you can wire a string array to this vi and have a spreadsheet from there.
    Remember to modify the COPY, and be careful with the format string.

  • Date Field doesn't show time

    For some reason my Report shortens the date field to 9 characters. I am not able to change that value in the Property Pallette. Because of this shortening (or for some other reason) the field displays only the date portion of the field. However the field contains time portion as well, which I need to display. How do include the time portion?
    Thank you.

    Check the field's length and type in the data model to make sure it comes properly from the DB.If it is Date type, try selecting different format mask in the field's propertis on the layout model. If the format includes time, make sure there is enough space in the field to display it.

  • How to Convert a 'Time Stamp' field to Date......?

    Hello Gurus:
    I am using a Generic Extractor to pull some stats data.  One of the field is a Time Stamp field, which tells me the date and time of Transaction run.  I only need "Date".  I tried mapping the stamp field to Date info-object hoping for a automatic determination of the Date.... (like the Week, Month happens).   Well, I was wrong! 
    I only need the Date part.  How can I do this in BI?  is teher a specific SAP info-object for this that could be used..?  If not, what would be the routine.  The Date field that comes in is a SAP format... "u201C20,070,505.0000000u201D meaning the Transaction was run
    on 05/05/2007.  How can I get this convertion in BI transaformation??  is there a special Routine...?
    Also, we are trying to use "Time Stamp" based DELTA from a generic extraction.  The field used is a System date with time stamp.  Value looks like u201C20100,505,170,113.2918470u201D, u201C20100,505,170,113.4748820u201D  Every record pulled has a different value... probably giving me the time at which the record was created or generated.  Now, with DELTA specifid on this type of field, what will be the 'Current Status" value in Delta queue?  Is it based on the last record created and will that be the highest value?  For next Delta extraction, does it compare the extraction time stamp to this value and bring in those records that are greater than the 'Current Status" value?  I guess with that we can have as many deltas as we want..... right??  is there any particular setting I should be doing or worried/ careful about setting etc....?
    Thanks for the response in advance....
    Best..... SMaa

    Thanks Akshay,
    Your suggestion worked right away and was probably the easiest of all.  I tried the Function Module that Pravender suggested,
    but it did not return me the date back.... may be because it does not need the Micro Seconds in it....?  Routine as suggested by
    Satyam might work too, but did not go there....! 
    Thanks to all of you.
    Best..... SMaa

  • Viewing and Removing the Time part of the Date field

    Hi,
    I have Date field in a table.
    but in SQL plus when I do
    select date from table
    this gives me only the Date values and not the timestamps in the date.
    I believe Oracle stores 'Date' and 'Time' in fields with Data Type 'Date'.
    How do I print the timestamps also in the SQL query?
    Moreover, if I have to extract the date field, reset the timestamp to 00:00:00, and store back the date field (with 00 time), how do I do that?
    Thanks in advance
    - Manu

    Hi,
    If you want to retry date and time you can:
    SELECT TO_CHAR(DATE,'YYYY/MM/DD HH24:MI:SS') FROM TABLE;
    If you want truncate time when inserting in a table simply use TRUNC function
    INSERT INTO TABLE (DATE) VALUES (TRUNC(YOUR_DATE));
    To extract and insert with time 00:00:00
    INSERT INTO TABLE1 (SELECT TRUNC(DATE) FROM TABLE2);
    I hope this help you.

  • Problem with updating Time component of an Oracle Date field in ALBPM

    Hi.
    I'm new to ALBPM and am experiencing the following problem I hope someone can take the time to help out with.
    I'm using a Date and Time Picker element in a Form to enter the date and time information. Within ALBPM the date and time representation appears correct as it prints out what I've entered. The logMessage displays this information in the form "YYYY-MM-DD HH24:mm:ss+TimezoneOffset". The BPM Object that stores this value is referencing an Oracle table that has an equivalent Date field. My problem is that it appears to only update the Date component.
    I've also tried using the native Time variable type within ALBPM be adding an variable of type Time to the BPM Object and setting the result Database object equal to this Time variable with the same result. The Time variable was declared with Timestamp precision (take this to mean both Date and Time components).
    Has anyone come across this problem? I'm using ALBPM Studio 6.0 M3 as my release.
    Thanks.

    I must have deselected the "Use Timestamp for Date columns" in the Advanced tab within the External Resource definition for my database at some point in time. Enabling this option fixed my problem - silly me.

  • Inserting Date and Time into a date field

    Okay I am a bit of a Oracle newbie. I am trying to insert the following date and time into a date field and I don't know how to format the second part of the to_Date() function.
    Date/Time: 5/29/2003 7:58:45 PM
    Thanks,
    Branden

    I believe you would want
    to_date( '5/29/2003 7:58:45 PM', 'MM/DD/YYYY HH:MI:SS AM' )
    Note that tahiti.oracle.com has all of Oracle's documentation, including the very useful SQL & PL/SQL reference manuals, available for free.
    Justin

  • Why does Oracle SQL query returning a date field without the time component

    Hi,
    I'm a novice SQL user & hv just installed Oracle SQL developer (Version 3.0.04, Build MAIN-04.34).
    I made the same SQL query using "Oracle SQL developer" & "TOAD for Oracle 9.0.1" but I got 2 different format on the same date field:
    On TOAD, I get the date field extracted as *04/26/2011 23:12:58*
    On Oracle, I get the date field extracted as *26/APR/11*
    Why is the Oracle result in a different format & missing the time component?
    Is there any option/preference that I need to set in Oracle SQL developer to get the full date/time format displayed?
    I've tried to set my the date format to DD/MON/RR HH12:MI:SSXFF AM under the preference -> database NLS but I still get the same format!
    Plse help!

    hokim wrote:
    Hi,
    I'm a novice SQL user & hv just installed Oracle SQL developer (Version 3.0.04, Build MAIN-04.34).
    I made the same SQL query using "Oracle SQL developer" & "TOAD for Oracle 9.0.1" but I got 2 different format on the same date field:
    On TOAD, I get the date field extracted as *04/26/2011 23:12:58*
    On Oracle, I get the date field extracted as *26/APR/11*
    Why is the Oracle result in a different format & missing the time component?
    Is there any option/preference that I need to set in Oracle SQL developer to get the full date/time format displayed?
    I've tried to set my the date format to DD/MON/RR HH12:MI:SSXFF AM under the preference -> database NLS but I still get the same format!
    Plse help!http://edstevensdba.wordpress.com/category/nls_date_format/

  • Date/Time Field but not a date field type..

    I am dealing with a table that was already created and filled/filling with data.. so don't have an option to have someone go back and fix.
    The field i am dealing with is a varchar2 not a date field.
    it has values like
    12/31/1899
    2/17/2010 10:00:00 AM
    2/24/2010 9:00:00 AM
    2/17/2010 8:30:00 AM
    2/24/2010 9:00:00 AM
    12/31/1899
    Basically the 12/31/1899 dates are supplied the data source as an indicator that the real date/time is unknown until it gets updated later in the day or next day. (why its like this i don't know)
    anyways.. I need to drop records that are 7 days old.
    So for say the 2/17/2010 ones, when its 2/24/2010 when the process is ran, those records will get deleted but with the '12/31/1899' ones staying as they are awaiting to be given a date/time '12/31/1899' date is always used for the 'unknowns' so that is constant. The other 'valid ones' always have a date and a time given.
    I've tried a few things today, but kept blowing up.
    Edited by: CPSteven on Feb 11, 2010 6:04 PM

    >
    ORA-01830: date format picture ends before converting entire input string
    With that command
    The time in their messing with it?
    >
    You'd have that problem if the date format picture ends before any of your your strings end....
    Eg.. your date field has "time component" and you just use... "DD-MON-YYYY" as the format picture.
    However, If your format picture includes the maximum possible detail (of any of your strings) , you'll not see that error. Check this code below.
    sql> select * from temp;
            ID DATE_STRING
             1 02/11/2010 03:10:26
             2 02/10/2010 03:10:26
             3 02/09/2010 03:10:26
             4 02/08/2010 03:10:26
             5 02/07/2010 03:10:26
             6 02/06/2010 03:10:26
             7 02/05/2010 03:10:26
             8 02/04/2010 03:10:26
             9 02/03/2010 03:10:26
            10 02/02/2010 03:10:26
            11 12/31/1899
            ID DATE_STRING
            12 12/31/1899
    12 rows selected.
    sql> delete from temp
      2  where date_string != '12/31/1899'
      3    and to_date(date_string,'MM/DD/YYYY') < (sysdate-7);
      and to_date(date_string,'MM/DD/YYYY') < (sysdate-7)
    ERROR at line 3:
    ORA-01830: date format picture ends before converting entire input string
    sql> delete from temp
      2    where date_string != '12/31/1899'
      3      and to_date(date_string,'MM/DD/YYYY HH24:MI:SS') < (sysdate-7);
    4 rows deleted.
    ----In your case.. your format mask would be to_date(date_string,'MM/DD/YYYY HH:MI:SS AM')

  • Deriving Time Characteristics from Date fields in ODS View

    Hi,
    I am creating ODS Views using HANA calculation views.
    is there any direct approach to derive time characteristics like cal week, cal quarter, cal month, calmonth 2, fiscal year, cal year etc from date fields?
    work around:
    Deriving them in HANA view in calculated columns and mapping them to IO created with respective time characteristics as reference.
    is there any standard and easy to use approach for this??
    Thanks in advance.

    Hi Ravi,
    Insteod deriving them in the ODS view you can derive them in tha Calculation View in SAP HANA itself using Time Dimention concept.
    Regards
    Jagan

  • Multiple Date Fields (Fact Table) - Linking with Time Dimension

    I have a fact table that has multiple date columns.
    I can make a time dimension, but it has to be joined to a particular date column. This becomes difficult because of the limit in having multiple date fields reference one time dimension. I can see possibly
    creating a date table which contains all dates, link to fact as well as time dimension table. I am trying to better visualize the table layout on this one. Or are there possibily better ways of looking at this senerio
    Any idea's

    Figured this one out; going to use one time dimension - what looking too much into the details in regard to this scenerio

  • Cannot store time in DB Date fields

    Time is truncated on all my dates field in database. When I expand the tables in Form Developer, Date Items are defined as Date(7).
    Is this the cause of my problem?
    Thanks for any info,
    Valdek

    IT DOES NOT GET TRUNCATED. HERE HOW I SIMULATED YOUR PROBLEM. CREATED A TABLE CALLED X WITH A FIELD Y AS DATE TYPE. CREATED A BLOCK BASED ON THE TABLE X. SET THE FORMAT MASK AS MM/DD/RRRR HH24:MI:SS . SET THE DEFAULT VALUE TO $$DBDATETIME$$. RUN THE FORM. CHANGED THE TIME. SAVED THE DATA. RETRIVED THE DATA . IT RETRIVES PERFECTLY WITH THE VALUE LIKE 08/22/2001 17:22:51. TO GET IT IN SQL YOU HAVE TO USE TO_CHAR LIKE
    SELECT TO_CHAR(Y,'MM/DD/RRRR HH24:MI:SS') FROM X;
    HOPE YOU GOT THE ANSWER.

  • JSTL sql:query date field has zero time part

    I have a little JSP where I am using JSTL to do a query against a table "ph_application" that has a date field "rundate". This field has many different dates and times in it.
    Here is the code snippet:
    <sql:setDataSource url="jdbc:oracle:thin:@oraprd02:1521:ipp4" user="site" password="pmc_site"/>
    <sql:query var="application" sql="select * from ph_application"/>
    <c:forEach items="${application.rows}" var="row">
    <tr>
    <td><c:out value="${row.name}" default=" " escapeXml="false"/></td>
    <td><fmt:formatDate value="${row.rundate}" type="both"/></td>
    </tr>
    </c:forEach>
    The resulting date/time output always has a 12:00:00 AM time regardless of what is actually in the table. I have changed the fmt:formatDate to a c:out of the row.rundate.time value and it appears that the time part of the date is actually zero at this point.
    Is there an inconsistancy between the oracle date type and what JSTL is expecting (somewhere)?
    Any help and/or verification is appreciated.
    Richard

    I'm running this from within JDeveloper 10g.

Maybe you are looking for

  • IWeb snippets working  locally but not working when uploaded to ISP

    I am using iWeb 3.0.2. When I add an HTML snippet to a page to add an item to a shopping cart [ADD TO CART], then publish and view site, the snippet works perfectly. However when I upload the page to the ISP, the snippet is not displayed even though

  • Cannot install Adobe Reader on Windows 7 Home Premium

    The download is not a problem. I have tried the fixes on the Adobe page and through Google Search. Help! The installation gives this error at about 97% complete: Error 1935.An error occurred during the installation of assembly component {B708EB72-AA8

  • Premier Pro CS6 plugins

    I have purchased and have been using third party transition plugins from Filmimpact.net. When a update notice got to me about these I attempted to do the update and have lost them completly. What can I do to get them back?

  • Implementing Drag and Drop Functionality

    I'm implementing drag and drop a record from a table to another table. I already referred below: http://download.oracle.com/docs/cd/E15523_01/web.1111/b31973/af_dnd.htm#CIHDADFG But I have a question. In example 32-5, there is a source like following

  • OAS - WebLogic

    Hi Now we have below applications running in OAS. 1) Apex applications with reports 2) Forms applications We want to migrate to Web Logic or Oracle Web Tier. 1) We can migrate apex applications to Oracle Web Tier, But If we want to run reports Is the