Calculating total time from a query

Hi everyone,
I have a simple database and one of the fields in this
database is time spent on stuff, for example a bike ride lasted
00:45:00, 01:33:03, 01:23:03 ETC
what I am trying to do is calculate total time. so do a sum
of that column.
Simple enough.
the column is a VarChar, I tried Time as well and well that
did not go well.
if I use mysql command line I get this:
mysql> SELECT SUM(mv_time) FROM data WHERE user_id = 2;
+--------------+
| SUM(mv_time) |
+--------------+
| 8 |
+--------------+
1 row in set (0.00 sec)
No idea how it came up with that one as 8 is incorrect
so I got a bit fancier:
mysql> SELECT SEC_TO_TIME(SUM(TIME_TO_SEC(mv_time))) AS
mv_time FROM data WHERE user_id = 2;
+----------+
| mv_time |
+----------+
| 26:14:58 |
+----------+
1 row in set (0.00 sec)
Bingo that is correct.
but if I use that same query within cfquery I get a nice java
error telling that you can't have 26 hours in a single day.
Any ideas how I can accomplish this should be simple task?
Thank you.
Luc

Hi Cf_dev2,
How would I go about making easy for my users to submit the
seconds into the database?
for example I would want them (them being me really :) ) to
enter 01:35:00 (for one hour and 35 minutes) and then have CF or
SQL convert that to seconds (instead of having myself figure that
out manually I am no good at math)
Jdeline, I don't understand what you mean by not storing it
as comma delimited, as far as I know its not comma delimited, its
stored in a table called data along with a primary key id, userid,
date, etc
Thanks
Luc

Similar Messages

  • Is there a way I can have my form calculate a total time from beginning and ending time?

    Is there a way I can have my form calculate a total time from beginning and ending time?

    Sorry, but Formscentral doesn't support either a timer function or any kind of calculation. You might be able to do this if created your form in PDF. For help with PDF form creation in Acrobat I suggest you repost your question to the Acrobat Forum.
    Andrew

  • Calculating total time.

    I'm somewhat new to using spreadsheets. Basically I just want to keep track of the time I spend doing a particular job. So I'm tracking my start time, end time, and then I want to calculate the total time spent. Thanks.

    Yes, I thought about that. But if you start at say
    9pm and end at 2am you would get the incorrect result
    of 7 hours. I think I have to convert the time to
    something else before the math takes place. But I'm
    not sure how that would work.
    I'm not sure how you managed to subtract 9pm from 2pm and get 7 hours. When I try 2am - 9pm, I get #VALUE!, as AppleWorks reads both 'times' as text, and cannot use Text values in a formula that requires numbers. AppleWorks is a bit fussy on what it considers to be a number.
    Using the default alignment, you can recognize what AppleWorks thinks is a number—it will be aligned to the right of the cell—and what AW considers to be Text—it will be aligned to the left of the cell. In the case of Time, you're better off using the 24 hour clock, and entering one minute betore 2pm as 13:59.
    The Mac clock's unit of time is the (24 hour) Day, and all times entered are regarded as the portion of one day that has elapsed up to that time. When you do the subtraction, the result is also a time of day. For start and end times within the same calendar day, simply doing the subtraction will give a result that can be read as the (correct) elapsed time. For the example times you gave, the 'correct' result is also visible:
    02:00 - 21:00 = 05:00
    But the actual numbers behind that 05:00 result and the two times used to get it are the portion of the current day that has passed up to each of the times entered, and the difference obtained when you do the subtraction:
    0.0833 - 0.8750 = -0.7917
    If you only want the (readable) result for a single day, that's not a problem. But if you want to add the results to get a total time for a week, you need to (make AppleWorks) do some additional math. In simplest terms, you need to add 1 to the end time if the end time is on the calendar day after the start time. There's an explanation of this below, which you should read for a better understanding of Time and the Mac, but which isn't necessary to use the formula.
    The formula assumes your start time is in column B, your end time in column C, your formula reporting time worked is in column D, and that you will enter times in rows 2..6, and calculate the week's sum in D7
    Enter in D2, and fill down to D6: =IF(C2,C2-B2+(C2<B2),"")
    Format these cells to display as Time.
    Enter in D7: =24(SUM(D2..D6)) —to report the result in hours (eg. 25.678)
    Format the cell to display as Number, General.
    or
    Enter in D7: =INT(24(SUM(D2..D6))&":"MINUTE(SUM(D2..D6)) —to report the result as hours and minutes
    Note that the second option for D7 produces a text string which will not be useable in further calculations.
    This is Text, so no Number formatting is necessary.
    Regards,
    Barry
    Time and the Mac
    The Mac clock tracks time in Days and Fractions of a Day, starting at midnight, January 1, 1904.
    Nine PM today, May 8, 2006, represented as a decimal number, is 37383.875. Two AM tomorrow, May 9, 2006, is 37384.0833333333.
    An AppleWorks spreadsheet cell (or database field) formatted to display as Time will ignore the whole number part of those numbers, and interpret the decimal fraction part as Time of Day, and display the result in the Time format you have chosen for the cell.
    A cell (or field) formatted to display as a Date will ignore the fractional part of the number, and display the whole number part in the Date format you have chosen.
    When you enter a time, the result is the time of day on January 1, 1904. When calculating elapsed times where start and end times cross the midnight boundary, you need to add 1 (day) to the result to compensate for the change in day and get a result that can be used in further calculations. That's what the "+(C2<B2)" part of the first formula above does—adds 1 if "(C2<B2)" is TRUE or adds 0 it it's false.
    If you add times, the result is 'correct', but if the total reaches 24 hours, the displayed result will appear incorrect as a Time formatted cell ignores the whole number part of the actual result (eg. 27 hours, or 1.25 days), will display as 03:00, the same as 3 hours, or 0.25 days. You can convert the result to hours and fractions of hours by simply multiplying the result by 24, and displaying it as a Number rather than as Time.
    B

  • Calculating average time from two records from the same table.

    Hi all
    I need to calculate the average time between two events that are recorded in the same table.
    The table is TMS_MESSAGE_AUDIT_LOG
    MESSAGE_ID VARCHAR2(16 BYTE) NOT NULL,
    MESSAGE_VERSION NUMBER(2) NOT NULL,
    CREATE_TM VARCHAR2(18 BYTE) NOT NULL,
    MESSAGE_STATUS VARCHAR2(30 BYTE),
    TRANSACTION_TYPE_NM VARCHAR2(30 BYTE),
    MESSAGE_TP VARCHAR2(3 BYTE),
    WORKFLOW_OBJECT VARCHAR2(30 BYTE) NOT NULL,
    WORKFLOW_REQUEST VARCHAR2(30 BYTE) NOT NULL,
    WORKFLOW_RETURN_CD VARCHAR2(30 BYTE) NOT NULL,
    AUDIT_ACTION VARCHAR2(255 BYTE),
    LAST_UPDATE_USER_LOGON_ID VARCHAR2(12 BYTE),
    LOCAL_TM VARCHAR2(18 BYTE) NOT NULL,
    LOCAL_TIME_ZN_NM VARCHAR2(70 BYTE) NOT NULL,
    LOCAL_DAYLIGHT_IN CHAR(1 BYTE) NOT NULL,
    FPRINT VARCHAR2(30 BYTE)
    What i now need is
    When the MESSAGE_ID is the same i need have the average time between when the MESSAGE_STATUS is AA and BB ( I need the time out of the CREATE_TM field )
    And this for every 15 minutes interval.
    Because this table will become BIG millions and millions of records it needs to be fast.
    Can anybody help me.
    Marcel

    Something like this?
    CREATE TABLE wr_test
    ( message_id                 VARCHAR2(16 BYTE) NOT NULL
    , message_version            NUMBER(2) NOT NULL  -- Assumption: Acknowledged ver > Received ver
    , create_tm                  VARCHAR2(18 BYTE) NOT NULL
    , message_status             VARCHAR2(30 BYTE)
    , transaction_type_nm        VARCHAR2(30 BYTE)
    , workflow_object            VARCHAR2(30 BYTE) DEFAULT 'x' NOT NULL
    , workflow_request           VARCHAR2(30 BYTE) DEFAULT 'x' NOT NULL
    , workflow_return_cd         VARCHAR2(30 BYTE) DEFAULT 'x' NOT NULL
    , audit_action               VARCHAR2(255 BYTE)
    , last_update_user_logon_id  VARCHAR2(12 BYTE)
    , local_tm                   VARCHAR2(18 BYTE) NOT NULL
    , local_time_zn_nm           VARCHAR2(70 BYTE) DEFAULT 'GMT' NOT NULL
    , local_daylight_in          CHAR(1 BYTE) DEFAULT 'x' NOT NULL );
    INSERT ALL
    INTO   wr_test
           ( message_id
           , message_version
           , create_tm
           , message_status
           , local_tm )
    VALUES ( message_id
           , 1
           , create_tm
           , '(Receive)'
           , TO_CHAR(local_tm,'YYYYMMDD HH24:MI:SS') )
    INTO   wr_test
           ( message_id
           , message_version
           , create_tm
           , message_status
           , local_tm )
    VALUES ( message_id
           , 2
           , create_tm
           , 'Wait CLSB Ack'
         , TO_CHAR
           ( local_tm + NUMTODSINTERVAL(DBMS_RANDOM.VALUE(0,2e5),'SECOND')
           , 'YYYYMMDD HH24:MI:SS' ) )
    SELECT ROWNUM AS message_id
         , TO_CHAR(SYSDATE,'YYYYMMDD HH24:MI:SS') AS create_tm
         , DATE '2000-01-01' + DBMS_RANDOM.VALUE(0,3) AS local_tm
    FROM dual CONNECT BY ROWNUM < 100000;
    WITH src AS
         ( SELECT message_id
                , message_status
                , message_version
                , TO_DATE(SUBSTR(local_tm,1,17),'YYYYMMDD HH24:MI:SS') AS dt
                , TO_DATE(SUBSTR(local_tm,1,8),'YYYYMMDD') AS dt_day
                , TO_CHAR(TO_DATE(SUBSTR(local_tm,10,8),'HH24:MI:SS'),'SSSSS') AS dt_sec
           FROM   wr_test
           WHERE  message_status IN ('(Receive)','Wait CLSB Ack') )
    SELECT dt_day + NUMTODSINTERVAL(period,'SECOND') AS dt
         , NUMTODSINTERVAL(AVG(elapsed),'DAY') AS avg_elapsed
         , NUMTODSINTERVAL(MIN(elapsed),'DAY') AS min_elapsed
         , NUMTODSINTERVAL(MAX(elapsed),'DAY') AS max_elapsed
         , COUNT(*)
    FROM   ( SELECT message_id
                  , message_status
                  , dt_day
                  , TRUNC(dt_sec/300)*300 AS period
                  , LEAD(dt) OVER (PARTITION BY message_id ORDER BY message_version) AS ack_dt
                  , LEAD(dt) OVER (PARTITION BY message_id ORDER BY message_version) - dt AS elapsed
             FROM   src ) cal
    WHERE  cal.message_status = '(Receive)'
    GROUP BY dt_day, period
    ORDER BY 1;Replace "wr_test" with "tms_message_audit_log" in the WITH subquery to test on your data.

  • Total time

    My client need equipment available time. it is [total time - total down time] how can I get the total time from system. I want to prepare the functional specifications.
    Regards,
    VM

    Hi
    You need to ask user to fix the total time .i,e. if they have three shift operation ( 8hr/shift), then total time is 24 hrs/day. then you need to ask them set breakdown indicator whenever the equipment is down. You can get this info from table for equipment.
    then calculate available time =total time u2013 total down time
    Let me know if you need any more information
    Jeny

  • How to get the total execution time from a tkprof file

    Hi,
    I have a tkprof file. How can I get the total execution time. Going through the file i guess the sum of "Total Waited" would give the total time in the section "Elapsed times include waiting on following events:"
    . The sample of tkprof is given below.
    SQL ID: gg52tq1ajzy7t Plan Hash: 3406052038
    SELECT POSTED_FLAG
    FROM
    AP_INVOICE_PAYMENTS WHERE CHECK_ID = :B1 UNION ALL SELECT POSTED_FLAG FROM
      AP_PAYMENT_HISTORY APH, AP_SYSTEM_PARAMETERS ASP WHERE CHECK_ID = :B1 AND
      NVL(APH.ORG_ID, -99) = NVL(ASP.ORG_ID, -99) AND
      (NVL(ASP.WHEN_TO_ACCOUNT_PMT, 'ALWAYS') = 'ALWAYS' OR
      (NVL(ASP.WHEN_TO_ACCOUNT_PMT, 'ALWAYS') = 'CLEARING ONLY' AND
      APH.TRANSACTION_TYPE IN ('PAYMENT CLEARING', 'PAYMENT UNCLEARING')))
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute    442      0.08       0.13          0          0          0           0
    Fetch      963      0.22       4.72        350      16955          0         521
    total     1406      0.31       4.85        350      16955          0         521
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 173     (recursive depth: 1)
    Number of plan statistics captured: 1
    Rows (1st) Rows (avg) Rows (max)  Row Source Operation
             1          1          1  UNION-ALL  (cr=38 pr=3 pw=0 time=139 us)
             1          1          1   TABLE ACCESS BY INDEX ROWID AP_INVOICE_PAYMENTS_ALL (cr=5 pr=0 pw=0 time=124 us cost=6 size=12 card=1)
             1          1          1    INDEX RANGE SCAN AP_INVOICE_PAYMENTS_N2 (cr=4 pr=0 pw=0 time=92 us cost=3 size=0 card=70)(object id 27741)
             0          0          0   NESTED LOOPS  (cr=33 pr=3 pw=0 time=20897 us)
             0          0          0    NESTED LOOPS  (cr=33 pr=3 pw=0 time=20891 us cost=12 size=41 card=1)
             1          1          1     TABLE ACCESS FULL AP_SYSTEM_PARAMETERS_ALL (cr=30 pr=0 pw=0 time=313 us cost=9 size=11 card=1)
             0          0          0     INDEX RANGE SCAN AP_PAYMENT_HISTORY_N1 (cr=3 pr=3 pw=0 time=20568 us cost=2 size=0 card=1)(object id 27834)
             0          0          0    TABLE ACCESS BY INDEX ROWID AP_PAYMENT_HISTORY_ALL (cr=0 pr=0 pw=0 time=0 us cost=3 size=30 card=1)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file sequential read                       350        0.15          4.33
      Disk file operations I/O                        3        0.00          0.00
      latch: shared pool                              1        0.17          0.17
    ********************************************************************************

    user13019948 wrote:
    Hi,
    I have a tkprof file. How can I get the total execution time.
    call count cpu elapsed disk query current rows
    total 1406 0.31 4.85 350 16955 0 521TOTAL ELAPSED TIME is 4.85 seconds from line above

  • Query takes more time from client

    Hi,
    I have a select query (which refers to views and calls a function), which fetches results in 2 secs when executed from database. But takes more than 10 mins from the client.
    The tkprof for the call from the client is given below. Could you please suggest, what is going wrong and how this can be addressed?
    The index IDX_table1_1 is on col3.
    Trace file: trace_file.trc
    Sort options: exeela 
    count    = number of times OCI procedure was executed
    cpu      = cpu time in seconds executing
    elapsed  = elapsed time in seconds executing
    disk     = number of physical reads of buffers from disk
    query    = number of buffers gotten for consistent read
    current  = number of buffers gotten in current mode (usually for update)
    rows     = number of rows processed by the fetch or execute call
    SELECT ROUND(SUM(NVL((col1-col2),(SYSDATE - col2)
    FROM
    table1 WHERE col3 = :B1 GROUP BY col3
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        0      0.00       0.00          0          0          0           0
    Execute   7402      0.27       7.40          0          0          0           0
    Fetch     7402      1.13      59.37       1663      22535          0        7335
    total    14804      1.40      66.77       1663      22535          0        7335
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 32  (ORADBA)   (recursive depth: 1)
    Rows     Execution Plan
          0  SELECT STATEMENT   MODE: ALL_ROWS
          0   SORT (GROUP BY NOSORT)
          0    TABLE ACCESS   MODE: ANALYZED (BY INDEX ROWID) OF 'table1'
                   (TABLE)
          0     INDEX   MODE: ANALYZED (RANGE SCAN) OF 'IDX_table1_1'
                    (INDEX)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file sequential read                      1663        1.37         57.71
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        0      0.00       0.00          0          0          0           0
    Execute      0      0.00       0.00          0          0          0           0
    Fetch        0      0.00       0.00          0          0          0           0
    total        0      0.00       0.00          0          0          0           0
    Misses in library cache during parse: 0
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file sequential read                     16039        3.09        385.04
      db file scattered read                         34        0.21          1.42
      latch: cache buffers chains                    26        0.34          2.14
      SQL*Net break/reset to client                   2        0.05          0.05
      SQL*Net message to client                       2        0.00          0.00
      SQL*Net message from client                     2       79.99         79.99
      SQL*Net message to dblink                       1        0.00          0.00
      SQL*Net message from dblink                     1        0.00          0.00
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        0      0.00       0.00          0          0          0           0
    Execute   7402      0.27       7.40          0          0          0           0
    Fetch     7402      1.13      59.37       1663      22535          0        7335
    total    14804      1.40      66.77       1663      22535          0        7335
    Misses in library cache during parse: 0
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file sequential read                      1663        1.37         57.71
        1  user  SQL statements in session.
        0  internal SQL statements in session.
        1  SQL statements in session.
        1  statement EXPLAINed in this session.
    Trace file: trace_file.trc
    Trace file compatibility: 10.01.00
    Sort options: exeela 
           1  session in tracefile.
           1  user  SQL statements in trace file.
           0  internal SQL statements in trace file.
           1  SQL statements in trace file.
           1  unique SQL statements in trace file.
           1  SQL statements EXPLAINed using schema:
               ORADBA.prof$plan_table
                 Default table was used.
                 Table was created.
                 Table was dropped.
       84792  lines in trace file.
        4152  elapsed seconds in trace file.Edited by: agathya on Feb 26, 2010 8:39 PM

    I have a select query (which refers to views and calls a function), which fetches results in 2 secs when >executed from database. But takes more than 10 mins from the client.You are providing proof for the latter part of your statement above.
    But not for the former part (fetches in 2 secs when exec'd from db).
    It would have been nice if you also provide the sql-trace information for that.
    Without it we cannot help you much. Other than making the observation that you obviously have a query that is I/O bound, and that I/O on your system is rather slow: on average an I/O takes 0.04 seconds (66.77 divided by 1663).

  • Find total processing time from routing

    Hi,
    I'm writing specs for creating a production scheduling report for sales orders. I'm stuck at finding the relevant tables and fields for this particular calc. I want to find the processing time from routing.
    Total Processing Time (if Procurement type = u201CEu201D, then all operations from tasklist/Routing Operations for the material number) = Setup Time + (Machine time * Operation Quantity) + (Labor time * Operation Quantity)
    Any suggestions??
    Thanks

    Hi
    Check with any one of the following table:
    EAPL     Allocation of task lists to pieces of equipment
    EINA     Purchasing Info Record: General Data
    EINE     Purchasing Info Record: Purchasing Organization Data
    ESKL     Account Assignment Specification: Service Line
    ESLH     Service Package Header Data
    ESLL     Lines of Service Package
    INOB     Link between Internal Number and Object
    KALC     Material Quantity Calculation - Formulas
    KALT     Material Quantity Calculation: Header
    KOCLU     Cluster for conditions in purchasing and sales
    KSSK     Allocation Table: Object to Class
    LFA1     Vendor Master (General Section)
    MAPL     Assignment of Task Lists to Materials
    MLST     Milestone
    MLTX     Milestone Description
    PLAB     Relationships
    PLAS     Task list - selection of operations/activities
    PLFH     Task list - production resources/tools
    PLFL     Task list - sequences
    PLFT     Process Instructions
    PLFV     PI Characteristics/Sub-Operation Parameter Values
    PLKO     Task list - header
    PLKZ     Task list: main header
    PLMK     Inspection plan characteristics
    PLMW     MAPL-Dependent Charac. Specifications (Inspection Plan)
    PLMZ     Allocation of bill of material items to operations
    PLPH     CAPP: Sub-operations
    PLPO     Task list - operation/activity
    Thanks
    Saravana
    Reward if useful

  • Error "Conversion failed when converting date and/or time from character string" to execute one query in sql 2008 r2, run ok in 2005.

    I have  a table-valued function that run in sql 2005 and when try to execute in sql 2008 r2, return the next "Conversion failed when converting date and/or time from character string".
    USE [Runtime]
    GO
    /****** Object:  UserDefinedFunction [dbo].[f_Pinto_Graf_P_Opt]    Script Date: 06/11/2013 08:47:47 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE   FUNCTION [dbo].[f_Pinto_Graf_P_Opt] (@fechaInicio datetime, @fechaFin datetime)  
    -- Declaramos la tabla "@Produc_Opt" que será devuelta por la funcion
    RETURNS @Produc_Opt table ( Hora datetime,NSACOS int, NSACOS_opt int)
    AS  
    BEGIN 
    -- Crea el Cursor
    DECLARE cursorHora CURSOR
    READ_ONLY
    FOR SELECT DateTime, Value FROM f_PP_Graficas ('Pinto_CON_SACOS',@fechaInicio, @fechaFin,'Pinto_PRODUCTO')
    -- Declaracion de variables locales
    DECLARE @produc_opt_hora int
    DECLARE @produc_opt_parc int
    DECLARE @nsacos int
    DECLARE @time_parc datetime
    -- Inicializamos VARIABLES
    SET @produc_opt_hora = (SELECT * FROM f_Valor (@fechaFin,'Pinto_PRODUC_OPT'))
    -- Abre y se crea el conjunto del cursor
    OPEN cursorHora
    -- Comenzamos los calculos 
    FETCH NEXT FROM cursorHora INTO @time_parc,@nsacos
    /************  BUCLE WHILE QUE SE VA A MOVER A TRAVES DEL CURSOR  ************/
    WHILE (@@fetch_status <> -1)
    BEGIN
    IF (@@fetch_status = -2)
    BEGIN
    -- Terminamos la ejecucion 
    BREAK
    END
    -- REALIZAMOS CÁLCULOS
    SET @produc_opt_parc = (SELECT dbo.f_P_Opt_Parc (@fechaInicio,@time_parc,@produc_opt_hora))
    -- INSERTAMOS VALORES EN LA TABLA
    INSERT @Produc_Opt VALUES (@time_parc,@nsacos, @produc_opt_parc)
    -- Avanzamos el cursor
    FETCH NEXT FROM cursorHora INTO @time_parc,@nsacos
    END
    /************  FIN DEL BUCLE QUE SE MUEVE A TRAVES DEL CURSOR  ***************/
    -- Cerramos el cursor
    CLOSE cursorHora
    -- Liberamos  los cursores
    DEALLOCATE cursorHora
    RETURN 
    END

    You can search the forums for that error message and find previous discussions - they all boil down to the same problem.  Somewhere in your query that calls this function, the code invoked implicitly converts from string to date/datetime.  In general,
    this works in any version of sql server if the runtime settings are correct for the format of the string data.  The fact that it works in one server and not in another server suggests that the query executes with different settings - and I'll assume for
    the moment that the format of the data involved in this conversion is consistent within the database/resultset and consistent between the 2 servers. 
    I suggest you read Tibor's guide to the datetime datatype (via the link to his site below) first - then go find the actual code that performs this conversion.  It may not be in the function you posted, since that function also executes other functions. 
    You also did not post the query that calls this function, so this function may not, in fact, be the source of the problem at all. 
    Tibor's site

  • SAP query error - 1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Conversion failed when converting date and/or time from character string.  'Received Alerts' (OAIB)

    SAP query error - 1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Conversion failed when converting date and/or time from character string.  'Received Alerts' (OAIB)
    SELECT    
    CASE WHEN T0.DocStatus = 'O' THEN 'OPEN'
    WHEN T0.DocStatus = 'C' THEN 'CLOSED'  END  AS 'Document Status',
    T0.DocDate AS 'Posting Date',
    T0.DocNum AS 'Doc.No',
    T0.NumAtCard,
    T0.TransId AS 'Trans. No.',
    T0.Comments AS 'Remarks',
    T0.CardCode AS 'Offset Acct',
    T0.CardName AS 'Offset Acct Name',
    sum(T0.DocTotal) + (T0.WTSum) as 'DocTotal',
    T3.DueDate AS 'Cheque Date',
    T3.CheckSum AS 'Amount'
    FROM         ODPO AS T0 LEFT OUTER JOIN
                          VPM2 AS T1 ON T0.ObjType = T1.InvType AND T0.DocEntry = T1.DocEntry LEFT OUTER JOIN
         OVPM AS T2 ON T2.DocEntry = T1.DocNum LEFT OUTER JOIN
                          VPM1 AS T3 ON T2.DocEntry = T3.DocNum
    where T0.DocDate>='[%0]' and T0.DocDate<='[%1]'

    Hi,
    Try this:
    SELECT   
    CASE WHEN T0.DocStatus = 'O' THEN 'OPEN'
    WHEN T0.DocStatus = 'C' THEN 'CLOSED'  END  AS 'Document Status',
    T0.DocDate AS 'Posting Date',
    T0.DocNum AS 'Doc.No',
    T0.NumAtCard,
    T0.TransId AS 'Trans. No.',
    T0.Comments AS 'Remarks',
    T0.CardCode AS 'Offset Acct',
    T0.CardName AS 'Offset Acct Name',
    sum(T0.DocTotal) + (T0.WTSum) as 'DocTotal',
    T3.DueDate AS 'Cheque Date',
    T3.CheckSum AS 'Amount'
    FROM         ODPO  T0 LEFT OUTER JOIN
                          VPM2  T1 ON T0.ObjType = T1.InvType AND T0.DocEntry = T1.DocEntry
    LEFT OUTER JOIN
         OVPM  T2 ON T2.DocEntry = T1.DocNum LEFT OUTER JOIN
                          VPM1  T3 ON T2.DocEntry = T3.DocNum
    where T0.DocDate >= '[%0]' and T0.DocDate <='[%1]'
    group by T0.DocStatus,T0.DocDate ,
    T0.DocNum ,
    T0.NumAtCard,
    T0.TransId ,
    T0.Comments ,
    T0.CardCode,
    T0.CardName ,
    T0.WTSum ,
    T3.DueDate ,
    T3.CheckSum
    Thanks & Regards,
    Nagarajan

  • When I try to backup my files from photoshop elements 12 the "calculating total media size" box will only get as far as 46% and then freeze, how can I make it go to 100%

    When I try to backup my files from photoshop elements 12 the "calculating total media size" box will only get as far as 46% and then freeze, how can I make it go to 100%

    hi barbara
    thank you for your response, i appreciate it.  there's definitely nothing wrong with the mouse or trackpad, both work fine in every other application....i can also easily change size dimensions in other programs on my computer so it doesn't seem to be that either.  it seems like there is something weird going on in the way that pse and my mac are interacting with each other, just wish i knew what it was.    thank you again, wish me luck!

  • HT4859 What do I do every time I tap "Back up Now" (through iCloud) it always says "The last backup could not be complete". My iPad is plugged in, locked and connected to wi-fi.  I still have available 11GB storage from 15GB total storage from iCloud.

    What do I do every time I tap "Back up Now" (through iCloud) it always says "The last backup could not be completed". My iPad is plugged in, locked and connected to wi-fi.  I still have available 11GB storage from 15GB total storage from iCloud.

    I'm having exactly the same problem. I have a new iPad, my iCloud account is set up and verified (I wouldn't be logged in and writing this otherwise), auto backups are turned on, but it's never completed a backup. If I manually select 'Backup Now' in iCloud Settings, it times out while estimating time remaining. Strangely, today my iCloud free storage space went from 5G to 4.9G then back to 5G. Annoyingly, I'm now getting reminders that I've never backed it up! The iCloud help I followed from the forum didn't cover this error message.

  • Printing from iCal with total time

    Is there a way when printing from iCal to show the total time that an event took place for? IE: If I print a day it will show at what time the event started and not when it ended. Is there a way to do this? Is there a way to get it to print the total time an event took? I say event but it could be a meeting as well.
    Thanks

    Can you be more specific?
    Mike

  • How do I change the new iTunes play list total time display from 1.5 hours format to exact display of 1hr 31min 12sec.

    In the new iTunes the play list total time displays in 1.5 hours format, how do I get it to clearly show 1hr 31min 12sec like before, I want the exact time so I can properly fit all the songs when I want to burn this playlist to a disc. You can no longer just click on it to change the display format. Nor can you right click, control click, or change it in options. If anyone knows I would very much appreciate your imput. Thank You.

    Actually, that's the problem ... in iTunes *11* it has stopped working.  I have the status bar displayed, and it is stuck on the 1.x hours format.
    That is very, very strange !!
    I can't get that to happen on mine. It worked in 11.0 and I updated today to 11.0.1 and it's OK.
    I've tried making a new playlist, I've tried changing an old playlist, smart playlist ...... all OK ????

  • Need help calculating total from flowable rows

    I am trying like a mad man to figure out how to calculate a total field from fields that flow one after another.  I utilized the tutuorial on Adobe, but the process to enter the formcalc forumula does not work in my instance.  I can upload the file to anyone interested in helpting.
    Thanks!
    Mike

    FormCalc is a feature of LiveCycle Designer forms, please repost in their forums.

Maybe you are looking for