Diff in two timestamp in minutes

Hi Gurus,
I wanted to find the diff between two timestamp in minutes on case condition
when type=1 then min(col2) and type=2 then max(col2)
type-(datatype-numeric)
col2-(datatype-timestamp)
how can i do this
Thanks

Im guessing you want like bleow
time-----------------type--------------------diff
10/11/2010-------1-----------------------10/23/2010minus10/12/2010
10/23/2010--------1---------------------10/23/2010minus10/12/2010
10/12/2010---------2---------------------10/23/2010minus10/12/2010
10/04/2010---------2----------------------10/23/2010minus10/12/2010
is it correct?

Similar Messages

  • Diff between two timestamp in minutes on case condition

    Hi Gurus,
    I wanted to find the diff between two timestamp in minutes on case condition
    when type=1 then min(col2) and type=2 then max(col2)
    type-(datatype-numeric)
    col2-(datatype-timestamp)
    how can i do this
    Thanks

    Hi,
    Is this a question about the Berkeley DB SQL product?
    If so, you should look at the documentation on time fields in the SQLite page here:
    http://www.sqlite.org/datatype3.html#datetime
    Otherwise, you are asking this on the wrong forum.
    Regards,
    Alex Gorrod
    Oracle Berkeley DB.

  • Timestamp in minutes on case condition

    Hi Gurus,
    I wanted to find the diff between two timestamp in minutes on case condition
    when type=1 then min(col2) and type=2 then max(col2)
    type-(datatype-numeric)
    col2-(datatype-timestamp)
    how can i do this
    Thanks

    Hi,
    Sorry, the question could means diozens of different things.
    This is the answer to one of them:
    SELECT     id
    ,       ...   -- other columns from individual rows
    ,     MAX ( CASE
                WHEN  type = 2
                THEN     col2
               END
             ) OVER (PARTITION BY  id)
          -     MIN ( CASE
                WHEN  type = 1
                THEN     col2
               END
             ) OVER (PARTITION BY  id)     AS dif
    FROM    table_x
    ;The dif column will be an INTERVAL DAY TO SECOND., which you can convert to a number if you need to.
    Whenever you have a question, post a little sample data (CREATE TABLE and INSERT statements) and the results you want from that data. Explain how you get those results from that data.
    Always say what version of Oracle you are using.

  • Difference between two timestamp.

    Hi,
    I want to find difference between two timestamp in minutes.
    Actually i want to retrieve difference between current timestamp and the timestamp taken from the table
    select log_time from serv_info where server_id = 1;
    Can anyone tell me the query to find difference between two timestamps in minutes.
    -haifriends

    SQL> WITH serv_in AS
         (SELECT SYSTIMESTAMP - 1 / 4 log_time,
                 SYSTIMESTAMP now
            FROM DUAL)
    SELECT log_time,
           now,
             24 * 60 * EXTRACT (DAY FROM (now - log_time))
           + 60 * EXTRACT (HOUR FROM (now - log_time))
           + EXTRACT (MINUTE FROM (now - log_time))
           + 1 / 60 * EXTRACT (SECOND FROM (now - log_time)) diff_in_minutes
      FROM serv_in
    LOG_TIME  NOW                                 DIFF_IN_MINUTES
    01-MRZ-07 01-MAR-07 03.47.42.107462 PM +01:00      360,001791

  • Difference in minutes for two timestamp values

    Dear All,
    I am having two timestamp values and need to calculate the total time in minutes between them and store in a variable.
    Can you please help me.
    Eg:
    T1 = 12-APR-12 06.01.56.000000 AM
    T2 = 10-APR-12 06.14.32.000000 AM
    I want to have T3 as the total time difference beteween T1 and T2 in minutes.
    Not able to convert +000000001 23:47:24.000000000 in minutes
    The above value I got was by just substracting T1 and T2
    Thanks!

    /* Formatted on 2012/04/12 15:56 (Formatter Plus v4.8.8) */
    DECLARE
       v_time1       date;
       v_time2       date;
       v_time_diff   number;
    BEGIN
       SELECT To_Date(TO_CHAR (wss_gdp_time, 'DD-MON-YYYY HH12:MI:SS'),'DD-MON-YYYY HH12:MI:SS')
         INTO v_time1
         FROM tab1
        WHERE wss_gdp_time = (SELECT MAX (wss_gdp_time)
                                FROM tab1) AND ROWNUM <= 1;
       SELECT to_Date(TO_CHAR (wss_gdp_time, 'DD-MON-YYYY HH12:MI:SS'),'DD-MON-YYYY HH12:MI:SS')
         INTO v_time2
         FROM tab1
        WHERE wss_gdp_time = (SELECT MAX (wss_gdp_time)
                                FROM tab1
                               WHERE wss_gdp_time < (SELECT MAX (wss_gdp_time)
                                                       FROM tab1))
          AND ROWNUM <= 1;
       SELECT ((v_Time1-v_time2) * 1440)
         INTO v_time_diff
         FROM DUAL;
       DBMS_OUTPUT.put_line (v_time1 || ' ' || v_time2 || ' ' || v_time_diff);
       IF v_time_diff > '10'
       THEN
          DBMS_OUTPUT.put_line ('ALERT');
       ELSE
          DBMS_OUTPUT.put_line ('No ALERT');
       END IF;
    END;
    /

  • Avg Time  Difference of Two timestamps in Oracle SQL

    Hello Members,
      I am trying to find the average of Time Difference of two timestamp columns by order number. I need to show the average of the time difference in hours:mins format. I have is SQL Server , but unable to get this in Oracle SQL. Could anyone please let me know how I need to find the time difference of two timestamp columns and show them in hh:mm fomat and then take average of these differences and show them in hh:mm format.  Below is what I have tried in SQL server.
    CREATE TABLE temp
    startdate smalldatetime,
    enddate smalldatetime
    INSERT temp
    SELECT '6/22/2013 19:00',
    '6/22/2013 19:20'
    UNION ALL
    SELECT '6/22/2013 19:22',
    '6/22/2013 19:44'
    UNION ALL
    SELECT '6/22/2013 19:45',
    '6/22/2013 19:50'
    UNION ALL
    SELECT '6/22/2013 19:52',
    '6/22/2013 20:02'
    UNION ALL
    SELECT '6/22/2013 20:05',
    '6/22/2013 20:10'
    UNION ALL
    SELECT '6/22/2013 20:15',
    '6/22/2013 20:20'
    SELECT CAST
    CAST
    ( SUM
    DATEDIFF(MINUTE,startdate,enddate)
    6*60
    As float)
    as varchar) + ':' +
    cast
    cast
    cast
    SUM
    DATEDIFF(MINUTE,startdate,enddate)
    6
    as int )
    % 60 as float )
    as varchar ) AS avg_time_diff_in_hh_mm_format
    FROM temp
    Please let me know if you need additional information.
    Thanks in Advance.

    Thanks for the reply Frank,
      I have tried some similar lines with your suggested approach, please see below:
    --DDL
    CREATE TABLE XX_ORD_TIMES
    (ORDER_NUM NUMBER(15),
             ACTUAL_START_DATE DATETIME,
             ACTUAL_FINISH_DATE DATETIME)
    --Sample Data
    Insert into XX_ORD_TIMES
       (ORDER_NUM, ACTUAL_START_DATE, ACTUAL_FINISH_DATE)
    Values
       ('SFM-07', TO_DATE('06/20/2013 14:22:58', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('06/21/2013 07:58:55', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into XX_ORD_TIMES
       (ORDER_NUM, ACTUAL_START_DATE, ACTUAL_FINISH_DATE)
    Values
       ('SFM-07', TO_DATE('06/21/2013 09:12:42', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('06/21/2013 09:18:15', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into XX_ORD_TIMES
       (ORDER_NUM, ACTUAL_START_DATE, ACTUAL_FINISH_DATE)
    Values
       ('SFM-07', TO_DATE('06/20/2013 15:59:07', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('06/20/2013 17:06:17', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into XX_ORD_TIMES
       (ORDER_NUM, ACTUAL_START_DATE, ACTUAL_FINISH_DATE)
    Values
       ('SVCEXT', TO_DATE('05/16/2013 11:56:05', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('05/24/2013 14:47:54', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into XX_ORD_TIMES
       (ORDER_NUM, ACTUAL_START_DATE, ACTUAL_FINISH_DATE)
    Values
       ('SVCEXT', TO_DATE('05/07/2013 09:23:37', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('05/07/2013 13:00:14', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into XX_ORD_TIMES
       (ORDER_NUM, ACTUAL_START_DATE, ACTUAL_FINISH_DATE)
    Values
       ('SVCEXT', TO_DATE('05/09/2013 14:06:08', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('05/22/2013 13:25:03', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into XX_ORD_TIMES
       (ORDER_NUM, ACTUAL_START_DATE, ACTUAL_FINISH_DATE)
    Values
       ('SVCNEWPLON', TO_DATE('05/21/2013 13:17:45', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('05/24/2013 14:35:04', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into XX_ORD_TIMES
       (ORDER_NUM, ACTUAL_START_DATE, ACTUAL_FINISH_DATE)
    Values
       ('SVCNEWPLON', TO_DATE('05/24/2013 09:00:04', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('05/29/2013 09:30:32', 'MM/DD/YYYY HH24:MI:SS'));
    --Avg time diffs
    SELECT  ORDER_NUM,
             ACTUAL_START_DATE
             ACTUAL_FINISH_DATE
                    TO_NUMBER (
                       SUBSTR (
                          NUMTODSINTERVAL (
                             AVG (
                                  CAST (ACTUAL_FINISH_DATE AS DATE)
                                - CAST (ACTUAL_START_DATE AS DATE)),
                             'DAY'),
                          2,
                          9))
                  * 24
                + TO_NUMBER (
                     SUBSTR (
                        NUMTODSINTERVAL (
                           AVG (
                                CAST (ACTUAL_FINISH_DATE AS DATE)
                              - CAST (ACTUAL_START_DATE AS DATE)),
                           'DAY'),
                        12,
                        2))
             || ':'
             || CASE
                   WHEN LENGTH (
                           TO_NUMBER (
                              SUBSTR (
                                 NUMTODSINTERVAL (
                                    AVG (
                                         CAST (ACTUAL_FINISH_DATE AS DATE)
                                       - CAST (ACTUAL_START_DATE AS DATE)),
                                    'DAY'),
                                 15,
                                 2))) < 2
                   THEN
                         '0'
                      || TO_NUMBER (
                            SUBSTR (
                               NUMTODSINTERVAL (
                                  AVG (
                                       CAST (ACTUAL_FINISH_DATE AS DATE)
                                     - CAST (ACTUAL_START_DATE AS DATE)),
                                  'DAY'),
                               15,
                               2))
                   ELSE
                      TO_CHAR (
                         SUBSTR (
                            NUMTODSINTERVAL (
                               AVG (
                                    CAST (ACTUAL_FINISH_DATE AS DATE)
                                  - CAST (ACTUAL_START_DATE AS DATE)),
                               'DAY'),
                            15,
                            2))
                END
                AS TIME_DIFF
        FROM XX_ORD_TIMES
       GROUP BY ORDER_NUM,
             ACTUAL_START_DATE
             ACTUAL_FINISH_DATE
             order by 1;
    Yes, I am trying to show the time difference of two timestamps ( finish date , start date ) in Hours:Mins  and also calculate the average of this Hours : Mins by ORDER_NUM .
    Please advise.
    Thanks again.

  • Need a sql query to get the difference between two timestamp in the format of hh:mm:ss.msec

    I have a database table where it keeps record of the transaction when it starts at StartTime and when it ends at EndTime. Both these entries are having the timestamp entries. Say for example, I have a tuple with Entries like 'Transaction A' starts at '2014-05-07
    20:55:03.170' and ends at '2014-05-08 08:56:03.170'. I need to find the difference between these two timestamps and my expected output is 12:01:00.000. Let me know how to achieve this ? 

    Hi,
    You can use below script which calculates difference as DD:HH:MM:SS. You can modify the same:
    DECLARE @startTime DATETIME
    DECLARE @endTime DATETIME
    SET @startTime = '2013-11-05 12:20:35'
    SET @endTime = '2013-11-10 01:22:30'
    SELECT [DD:HH:MM:SS] =
    CAST((DATEDIFF(HOUR, @startTime, @endTime) / 24) AS VARCHAR)
    + ':' +
    CAST((DATEDIFF(HOUR, @startTime, @endTime) % 24) AS VARCHAR)
    + ':' +
    CASE WHEN DATEPART(SECOND, @endTime) >= DATEPART(SECOND, @startTime)
    THEN CAST((DATEDIFF(MINUTE, @startTime, @endTime) % 60) AS VARCHAR)
    ELSE
    CAST((DATEDIFF(MINUTE, DATEADD(MINUTE, -1, @endTime), @endTime) % 60)
    AS VARCHAR)
    END
    + ':' + CAST((DATEDIFF(SECOND, @startTime, @endTime) % 60) AS VARCHAR),
    [StringFormat] =
    CAST((DATEDIFF(HOUR , @startTime, @endTime) / 24) AS VARCHAR) +
    ' Days ' +
    CAST((DATEDIFF(HOUR , @startTime, @endTime) % 24) AS VARCHAR) +
    ' Hours ' +
    CASE WHEN DATEPART(SECOND, @endTime) >= DATEPART(SECOND, @startTime)
    THEN CAST((DATEDIFF(MINUTE, @startTime, @endTime) % 60) AS VARCHAR)
    ELSE
    CAST((DATEDIFF(MINUTE, DATEADD(MINUTE, -1, @endTime), @endTime) % 60)
    AS VARCHAR)
    END +
    ' Minutes ' +
    CAST((DATEDIFF(SECOND, @startTime, @endTime) % 60) AS VARCHAR) +
    ' Seconds '
    Reference:
    http://sqlandme.com/2013/12/23/sql-server-calculating-elapsed-time-from-datetime/
    - Vishal
    SqlAndMe.com

  • To calculate elapsed time between two timestamp attributes

    Hello,
    I have two timestamp attributes (create_tmstmp & elapsed_tmstmp) in a table.
    It has two rows and I need the difference in seconds between these two attributes.
    The below query is returning negative value and incorrect value.
    Any help is appreciated.
    Row 1:
    Create_tmstmp : 2/2/2010 9:53:15.832 PM
    Elapsed_tmstmp : 2/3/2010 9:49:47.527 AM
    Row 2:
    Create_tmstmp : 2/3/2010 5:35:47.614 AM
    Elapsed_tmstmp : 2/3/2010 11:03:15.937 AM
    Select
    ( (extract(day from elapsed_tmstmp )-extract(day from create_tmstmp))*86400+
    (extract(hour from elapsed_tmstmp )-extract(hour from create_tmstmp))*3600+
    (extract(minute from elapsed_tmstmp)-extract(minute from create_tmstmp))*60+
    (extract(second from elapsed_tmstmp)-extract(second from create_tmstmp))*1000) completed_tmstmp
    From table_a;
    The output is :
    completedtmstmp_
    74655
    -11997
    Thanks.
    Edited by: solsam on Feb 4, 2010 11:57 AM

    hi,
    The problem with cast to date is
    SQL> select to_char(cast(to_timestamp('2/2/2010 9:53:15.832 PM','mm/dd/yyyy hh:mi:ss.ff pm') as dat
    e),'mm/dd/yyyy hh:mi:ss pm') from dual
    2 ;
    TO_CHAR(CAST(TO_TIMEST
    02/02/2010 09:53:16 pm
    so cast rounds it up, resulting in:
    SELECT (
    CAST (TO_TIMESTAMP ('2/2/2010 9:53:15.832 PM', 'mm/dd/yyyy hh:mi:ss.ff pm') AS DATE)
    - CAST (TO_TIMESTAMP ('2/2/2010 9:53:14.432 PM', 'mm/dd/yyyy hh:mi:ss.ff pm') AS DATE)
    * 86400 x
    FROM DUAL
    X
    2
    A more exact answer would use, to_char and to_date to convert :
    SELECT (
    TO_DATE (TO_CHAR (TO_TIMESTAMP ('2/2/2010 9:53:15.832 PM', 'mm/dd/yyyy hh:mi:ss.ff pm'),
    'mm/dd/yyyy hh:mi:ss pm'),
    'mm/dd/yyyy hh:mi:ss pm')
    - TO_DATE (TO_CHAR (TO_TIMESTAMP ('2/2/2010 9:53:14.432 PM', 'mm/dd/yyyy hh:mi:ss.ff pm'),
    'mm/dd/yyyy hh:mi:ss pm'),
    'mm/dd/yyyy hh:mi:ss pm')
    * 86400 x
    FROM DUAL
    X
    1
    Edit:
    Massimo Ruocchio's answer actually works better.
    -AC
    Edited by: user12026137 on Feb 9, 2010 12:45 PM

  • Diff between two date

    i hv two date type data along with time lets say
    p1 '21-jan-2001 12:43:05'
    p2 '22-jan-2001 13:33:10'
    i want diff between two dates p1-p2 will give only the number of days in between but i want even the time also
    for ex in the above ex the diff etween two days is 1 day 1hr bla bla.......

    Check that link... it will offer you a few alternatives:
    http://www.orafaq.com/faq/how_does_one_get_the_time_difference_between_two_date_columns
    HTH,
    Thierry
    with dates as (
    select to_date('22-jan-2001 13:33:10', 'DD-MON-YYYY HH24:MI:SS') as date1,
    to_date('21-jan-2001 12:43:05', 'DD-MON-YYYY HH24:MI:SS') as date2 from dual)
    SELECT floor(((date1-date2)*24*60*60)/3600)
                || ' HOURS ' ||
                floor((((date1-date2)*24*60*60) -
                floor(((date1-date2)*24*60*60)/3600)*3600)/60)
                || ' MINUTES ' ||
                round((((date1-date2)*24*60*60) -
                floor(((date1-date2)*24*60*60)/3600)*3600 -
                (floor((((date1-date2)*24*60*60) -
                floor(((date1-date2)*24*60*60)/3600)*3600)/60)*60) ))
                || ' SECS ' time_difference
    FROM dates;
    24 HOURS 50 MINUTES 5 SECS Edited by: Thierry H. on Mar 3, 2011 5:51 PM

  • How can I make a server differ between two or more clients?

    How can I make a server differ between two or more clients?
    The clients can connect and talk to the server fine, but how can I make the server talk to one, two or all clients? i.e. what would be a good way to implement this?
    Currently, the server listens for connections like this:
    while (listening) {
    try {
    new ServerThread(this, serverSocket.accept()).start();
    I guess one way would be to add the ServerThreads to a Hashtable with the client ID as key, and then get the ServerThread with the proper client ID, but this seems unnecessary complicated. Any ideas?

    Complicated was perhaps the wrong word, I should have
    written something like it doesn't "feel" right. Or is
    this a common and good way to solve communication
    between a server and multiple clients?Thats pretty much how I do it. I normally use an array or ArrayList of Sockets instead of HashTable, with [0] being the first player etc.... Then you can communicate with exactly who you want. If you want to send bytes to all of them, just send the same thing to each socket individually (or is there a better way to do this?).

  • I have totally "uninstalled" what I had and then reinstalled the newest  version of itunes.  Still......  First, when I click on the itunes icon to load it takes the program anywhere  from two to three minutes to load.  None of my other programs take this

    I have totally "uninstalled" what I had and then reinstalled the newest
    version of itunes.  Still......
    First, when I click on the itunes icon to load it takes the program anywhere
    from two to three minutes to load.  None of my other programs take this
    long.
    When in the itunes program I can be moving around in my library and itunes
    when choosing a song or songs, choosing file, edit, etc,. whatever command I
    choose it just suddenly stops.  I can issue five commands and watch each one
    respond in 30 second to two minute intervals.  I can issue several commands,
    even shutting down, and it will do all but takes several minutes to do so.
    My itunes program was working fine when this problem suddenly arose.
    Terry

    Click here and follow the instructions. You may need to completely remove and reinstall iTunes and all related components, or run the process multiple times; this won't normally affect its library, but that should be backed up anyway.
    (99436)

  • How to compare two Timestamps in java ??

    Hi , I have a class CurrentAddress, which is supposed to compare two TimeStamps of two address and store the current address
    I am not able to compare it using the < operator .How am I supposed to compare them ?
    Here is my code . Please reply
    public class CurrentAddress {
         private int EmpID;
         String CurrentEmpAddress;
         Timestamp CurrentTimeStamp;
         boolean TimeIsStampAlreadySet;
         public boolean compareTimeStamps(EmployeeAddress e)
               if(TimeIsStampAlreadySet)
                    Timestamp EmployeesTimeStamp=e.getTimeStamp();
                    if(EmployeesTimeStamp<this.CurrentTimeStamp)--------Compiler flags me here
    }I dont know what method will compare them .Is there anybody who can answer my question?
    Thanks a bunch
    Kavita Rivera

    Hi , Thank you , I will try that .
    I appreciate you writing back .
    Kavita Rivera .

  • Add two timestamp columns

    I have 2 timestamp columns in a table
    Columnname    type
    LoginTime          Timestamp
    LogoutTime        TimeStamp
    Need to find total hours... how to add 2 timestamp columns.. help me...

    Abi,
    As pointed out by Olaf, you are looking for the DATETIME type and not TIMESTAMP. The latter is just a rowversion value that helps to identify the version of each row inserted. The DATETIME type helps you to store YYYY-MM-DD HH:MM:SS.xxx format values as
    required.
    If your requirement is to find out the DIFFERENCE numebr of hours between the login and logout then the below query 1 shud help.
    (Im not sure what you mean by TOTAL hours - ADDING the two timestamp values.. If your looking at the total number of hours passed from day zero, then query might as well help. Pls let us know if otherwise)
    create table #temp
    LoginTime datetime,
    Logouttime datetime
    insert #temp select getdate(),'2014-03-18 23:04:42.790'
    insert #temp select getdate()-0.5,'2014-03-18 18:04:42.790'
    insert #temp select getdate(),'2014-03-18 20:04:42.790'
    --QUERY1:Finding the difference between the Login and logout times
    select
    Logintime,
    Logouttime,
    datediff(hour,LoginTime,Logouttime) as diff_hours
    from #temp
    --QUERY2:To find the SUM of hours of Login and logout
    select
    Logintime,
    Logouttime,
    datediff(hour,0,Logouttime) + datediff(hour,0,Logintime) as SUM_hours
    from #temp
    --cleanup
    drop table #temp
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • HT4362 Screensaver shows the same photographs every two or three minutes  while I have 1600 pictures to select.

    With Apple TV Screensaver ............ I have 320 pictures from which to select:  Why do I get the same pictures every two or three minutes?  Either very poor software engineering my Apple or arrogance by Apple TV.  I set time delay for 10 minutes to allow all pictures to load before setting actual time delay at 2 minutes.  The feature is worthless with this format,

    That is probably correct...
    If you are trying to extend them in the same direction, this will not work....
    See this Apple doc:
    http://support.apple.com/kb/HT4259
    Also see this:
    Wirelessly Extended Network (802.11n)
    If you are unable to build the recommended Roaming network, then a Wirelessly Extended Network is the next best option.
    To create a Wireless Extended Network you must place the extended Wi-Fi base station within range of the primary Wi-Fi base station.
    Extended network range considerations
    In the above example the primary Wi-Fi base station ➊ is out of wireless range of the extended Wi-Fi base station ➋, therefore the extended Wi-Fi base station cannot join or extend the wireless network. The extended Wi-Fi base station must be moved to a location that is within Wi-Fi range of the primary Wi-Fi base station.
    Important Note
    If another extended Wi-Fi base station ➋ is placed between the primary Wi-Fi base station ➊ and the extended Wi-Fi base station ➌, the extended Wi-Fi base station ➌ will not allow clients to join it. All extended Wi-Fi base stations must be in direct range of the primary Wi-Fi base station
    Please read the last Important Note above...........

  • How to get the time difference (in seconds) between two timestamp fields?

    Hi All,
    I'm exploring validation expressions in SAP MDM Data Manager version 7.1.07.245
    I have two timestamp fields, suppose Update Date and Update-GDS.
    What I'm trying to do is prompt a warning when:
    (Update Date minus Update-GDS) is greater than or equal to zero seconds
    AND
    (Update Date minus Update-GDS) is less than or equal to 900 seconds
    the bottomline is, Update Date must be equal or greater than to Update-GDS but Update Date must not exceed 900 seconds difference.
    my initial try was:
    (Update Date - Update-GDS)>=0 s AND (Update Date - Update-GDS)<=900 s
    But it always returns true even the time difference between update date and update-gds is beyond the condition.
    Can you please guide me through this?
    Thank you very much in advance.
    Regards,
    ~erwin

    Hi Abhishek,
    I tried your code but it always returns true.
    It seems subtraction of timestamp fields do not actually get the time difference... (in seconds)
    Is this possible anyway? Or is there any other better approach on this?
    Thanks,
    ~erwin
    Edited by: erwin.j.rivera on Dec 14, 2011 8:40 AM

Maybe you are looking for

  • Transaction Deadlock

    TRANSACTION (PROCESS ID) WAS DEADLOCKED ON RESOURCES WITH ANOTHER PROCESS AND HAS BEEN CHOSEN  AS THE DEADLOCKED VICTIM.RERUN THE TRANSACTION

  • Ipod not recognised XP SP3 (usbaapl.inf won't install)

    Hi, I have an XP laptop running SP3, I followed the instructions on the website about using 'usbaapl.inf' to try to get the driver to work but an error comes up saying: The specified location does not contain information about your hardware. I have t

  • Problem with rescheduling the TimerTask object

    Hi friends, Here is the code that I am working on right now... I am seeing the following output on the console. Could you please fix this issue with the exception. I am trying to reschedule the same TimerTask on the same record, but with a differrent

  • Is "Messages" app working properly for your Nework users?

    I'm seeing a very odd issue where the new 10.8 "Messages" app not acting properly for users with a networked home directory.  If logging in on the server, the users' Message app works just fine.  When logging on from a client mounting their home dire

  • My iPod nano shuffle doesn't turn on.

    I lost my iPod nano about 1 or 2 months ago, I  found it today and it didn't turn on so I though it could be the battery, so I put it to charge but It doesn't turn on and I dont' even know if it's charging... Help!