Convert difference in timestamps to minutes

Hello, using Oracle 11g R2.
Looking for a way to convert the differnce in systimestamps to number of minutes.
select systimestamp - order_received_ts
from order_table
where order_id = 17978

Etbin wrote:
select (systimestamp - (systimestamp-2)) * 24 * 60 from dual
+3300 00:20:29.525280
select (systimestamp - (systimestamp-2)) * 24 * 60 from dual
(SYSTIMESTAMP-(SYSTIMESTAMP-2))*24*60
+000002880 00:04:20.318880000
just look at the days
Regards
Etbin
select (3300-2880)/60 h from dual
H
7
Learned something: the second term systimestamp-2 looses the time zone but the first term systimestamp has it and it is taken into account. So if you're in India it's just the "expected behaviour"
Message was edited by: Etbin something I haven't thought of
I will take sometime to understand your statement there about "second systimestamp -2 loosing timezone"   and the query has been executed from Singapore though
Cheers,
Manik.

Similar Messages

  • Convert from epoch timestamp to human readable date

    Hi everybody,
         I want to retrieve a human readable date from an fpga target of a sbRIO9636 ,so what is the function which can convert an epoch timestamp to a human readable date ? 
    (Noting that i need to retrieve the second,minute,hour,day,month,year... from the fpga target of this device)
    Thanks

    I have a program which retrieve the current time of windows (with the Get Date/Time in Seconds and Seconds to Date/time functions) and calculate the julian day parameter by using the second,minute,hour,day,month and year wich are displayed on the elements of the Unbundle By Name function (connected in the output of Seconds to Date/time function).
    This program works within windows and real time but I can't run it in the chassis of the sbRIO (errors displayed that these functions above aren't supported in the current target)
    Can i use another method to solve this problem.
    (See the front panel of this program in the following attached file)
    Attachments:
    julian day.PNG ‏110 KB

  • 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.

  • Date difference in Days,hours minutes and seconds.

    Hi All,
    I have two date Suppose one is getdate() and other one is gatedate() +1 .I have to show the difference, currently I used a datediff in the stored proc which just shows the difference of the days :( but i need to show the difference in days:hours:minutes:seconds if possible.
    its a countdown with the current date. Like the two fields are sale_start_date and sale_end_date. Hope i am clear.
    Please let me know ASAP thanks in advance.Can anyone help me?all help is great help.
    Say the difference of
    12/6/2007 7:00:00 AM, 12/8/2007 8:00:00 AM  as 2 days 1:00:00)
    Thanks
    N

    One of the problems of using DATEDIFF when dealing with either seconds or milliseconds is that this function will result in execution errors if the start and end dates span then entire domain of possible dates.  Below is an alternative that seems to work over the entire date domain.  A couple of things to note:
    1. This select converts the days and seconds of each date into BIGINT datatypes to avoid the overflow error
    2. This select uses a CROSS APPLY operator; in this case I chose CROSS APPLY to suggest the possibility of converting this select into an inline table function.
    I suspect that if you dig around this forum and the net that you will find a better routine, but here is yet another alternative:
    declare @test table
    ( startDate datetime, endDate datetime)
    insert into @test values
    ('6/1/9', getdate()),
    ('6/9/9 15:15', '6/10/9 19:25:27.122'),
    ('6/9/9 15:15', '6/10/9 13:25:27.122'),
    ('6/9/9', '6/10/9 00:00:01'),
    ('1/1/1760', '12/31/2999')
    select
      startDate,
      endDate,
      [Days],
      [Hours],
      [Minutes],
      [Seconds]
    from @test
    cross apply
    ( select
        cast((endSecond - startSecond) / 86400 as integer) as [Days],
        cast(((endSecond - startSecond) % 86400) / 3600 as tinyint) as [Hours],
        cast(((endSecond - startSecond) % 3600) / 60 as tinyint) as [Minutes],
        cast((endSecond - startSecond) % 60 as tinyint) as [Seconds]
      from
      ( select
          86400 * cast(convert(integer, convert(binary(4),
                        left(convert(binary(8), startDate),4))) as bigint)
            + cast(convert(integer, convert(binary(4),
                right(convert(binary(8), startDate),4)))/300 as bigint)
          as startSecond,
          86400 * cast(convert(integer, convert(binary(4),
                        left(convert(binary(8), endDate),4))) as bigint)
            + cast(convert(integer, convert(binary(4),
                right(convert(binary(8), endDate),4)))/300 as bigint)
          as endSecond
      ) q
    ) p
    /* -------- Sample Output: --------
    startDate               endDate                 Days        Hours Minutes Seconds
    2009-06-01 00:00:00.000 2009-06-22 08:28:36.670 21          8     28      36
    2009-06-09 15:15:00.000 2009-06-10 19:25:27.123 1           4     10      27
    2009-06-09 15:15:00.000 2009-06-10 13:25:27.123 0           22    10      27
    2009-06-09 00:00:00.000 2009-06-10 00:00:01.000 1           0     0       1
    1760-01-01 00:00:00.000 2999-12-31 00:00:00.000 452900      0     0       0
    (5 row(s) affected)
     EDIT:
    I based the routine more-or-less on Thilla's reply.
    Kent Waldrop

  • Convert HH:MM:SS to minutes

    Hello people,
    I have date of type VARCHAR with the format HH:MM:SS however HH can be more than 24 for example 98:59:23.
    I need help converting this fileld (LAG) into minutes.
    Thank you in advance for your help.
    CREATE
    TABLE LOAD_INFO_ALL
    TMSTP
    DATE
    PROGRAM VARCHAR2(20 CHAR
    STATUS
    VARCHAR2(20 CHAR
    GRP
    VARCHAR2(20 CHAR
    LAG
    VARCHAR2(20 CHAR
    CHKPT
    VARCHAR2(20 CHAR
    Insert into LOAD_INFO_ALL
       (TMSTP, PROGRAM, STATUS, GRP, LAG,
        CHKPT)
    Values
       (TO_DATE('06/03/2013 07:03:23', 'MM/DD/YYYY HH24:MI:SS'), 'REPLICAT', 'RUNNING', 'RBGRA06A', '99:53:31',
        '00:06:37');
    Insert into LOAD_INFO_ALL
       (TMSTP, PROGRAM, STATUS, GRP, LAG,
        CHKPT)
    Values
       (TO_DATE('06/03/2013 07:11:01', 'MM/DD/YYYY HH24:MI:SS'), 'REPLICAT', 'RUNNING', 'RBGRA06A', '99:53:31',
        '00:14:39');
    Insert into LOAD_INFO_ALL
       (TMSTP, PROGRAM, STATUS, GRP, LAG,
        CHKPT)
    Values
       (TO_DATE('06/03/2013 07:26:31', 'MM/DD/YYYY HH24:MI:SS'), 'REPLICAT', 'RUNNING', 'RBGRA06A', '99:53:31',
        '00:29:55');
    Insert into LOAD_INFO_ALL
       (TMSTP, PROGRAM, STATUS, GRP, LAG,
        CHKPT)
    Values
       (TO_DATE('06/03/2013 07:18:38', 'MM/DD/YYYY HH24:MI:SS'), 'REPLICAT', 'RUNNING', 'RBGRA06A', '99:53:31',
        '00:22:14');
    Insert into LOAD_INFO_ALL
       (TMSTP, PROGRAM, STATUS, GRP, LAG,
        CHKPT)
    Values
       (TO_DATE('06/03/2013 07:34:23', 'MM/DD/YYYY HH24:MI:SS'), 'REPLICAT', 'RUNNING', 'RBGRA06A', '99:53:31',
        '00:37:49');
    Insert into LOAD_INFO_ALL
       (TMSTP, PROGRAM, STATUS, GRP, LAG,
        CHKPT)
    Values
       (TO_DATE('02/08/2013 05:49:17', 'MM/DD/YYYY HH24:MI:SS'), 'REPLICAT', 'RUNNING', 'RBGRA06A', '99:30:57',
        '00:14:06');
    Insert into LOAD_INFO_ALL
       (TMSTP, PROGRAM, STATUS, GRP, LAG,
        CHKPT)
    Values
       (TO_DATE('02/08/2013 05:57:53', 'MM/DD/YYYY HH24:MI:SS'), 'REPLICAT', 'RUNNING', 'RBGRA06A', '99:30:57',
        '00:22:43');
    Insert into LOAD_INFO_ALL
       (TMSTP, PROGRAM, STATUS, GRP, LAG,
        CHKPT)
    Values
       (TO_DATE('02/08/2013 05:40:40', 'MM/DD/YYYY HH24:MI:SS'), 'REPLICAT', 'RUNNING', 'RBGRA06A', '99:30:57',
        '00:05:29');
    Insert into LOAD_INFO_ALL
       (TMSTP, PROGRAM, STATUS, GRP, LAG,
        CHKPT)
    Values
       (TO_DATE('06/03/2013 06:47:40', 'MM/DD/YYYY HH24:MI:SS'), 'REPLICAT', 'RUNNING', 'RBGRA06A', '99:10:15',
        '00:34:31');
    Insert into LOAD_INFO_ALL
       (TMSTP, PROGRAM, STATUS, GRP, LAG,
        CHKPT)
    Values
       (TO_DATE('06/03/2013 06:32:05', 'MM/DD/YYYY HH24:MI:SS'), 'REPLICAT', 'RUNNING', 'RBGRA06A', '99:10:15',
        '00:19:04');
    Insert into LOAD_INFO_ALL
       (TMSTP, PROGRAM, STATUS, GRP, LAG,
        CHKPT)
    Values
       (TO_DATE('06/03/2013 06:16:51', 'MM/DD/YYYY HH24:MI:SS'), 'REPLICAT', 'RUNNING', 'RBGRA06A', '99:10:15',
        '00:03:39');
    Insert into LOAD_INFO_ALL
       (TMSTP, PROGRAM, STATUS, GRP, LAG,
        CHKPT)
    Values
       (TO_DATE('06/03/2013 06:55:20', 'MM/DD/YYYY HH24:MI:SS'), 'REPLICAT', 'RUNNING', 'RBGRA06A', '99:10:15',
        '00:42:17');
    Insert into LOAD_INFO_ALL
       (TMSTP, PROGRAM, STATUS, GRP, LAG,
        CHKPT)
    Values
       (TO_DATE('06/03/2013 06:39:53', 'MM/DD/YYYY HH24:MI:SS'), 'REPLICAT', 'RUNNING', 'RBGRA06A', '99:10:15',
        '00:26:37');
    Insert into LOAD_INFO_ALL
       (TMSTP, PROGRAM, STATUS, GRP, LAG,
        CHKPT)
    Values
       (TO_DATE('06/03/2013 06:24:29', 'MM/DD/YYYY HH24:MI:SS'), 'REPLICAT', 'RUNNING', 'RBGRA06A', '99:10:15',
        '00:11:23');
    Insert into LOAD_INFO_ALL
       (TMSTP, PROGRAM, STATUS, GRP, LAG,
        CHKPT)
    Values
       (TO_DATE('02/08/2013 05:32:03', 'MM/DD/YYYY HH24:MI:SS'), 'REPLICAT', 'RUNNING', 'RBGRA06A', '99:00:24',
        '00:27:23');
    Insert into LOAD_INFO_ALL
       (TMSTP, PROGRAM, STATUS, GRP, LAG,
        CHKPT)
    Values
       (TO_DATE('02/08/2013 05:23:21', 'MM/DD/YYYY HH24:MI:SS'), 'REPLICAT', 'RUNNING', 'RBGRA06A', '99:00:24',
        '00:18:44');
    Insert into LOAD_INFO_ALL
       (TMSTP, PROGRAM, STATUS, GRP, LAG,
        CHKPT)
    Values
       (TO_DATE('02/08/2013 05:14:41', 'MM/DD/YYYY HH24:MI:SS'), 'REPLICAT', 'RUNNING', 'RBGRA06A', '99:00:24',
        '00:10:05');
    Insert into LOAD_INFO_ALL
       (TMSTP, PROGRAM, STATUS, GRP, LAG,
        CHKPT)
    Values
       (TO_DATE('02/08/2013 05:06:02', 'MM/DD/YYYY HH24:MI:SS'), 'REPLICAT', 'RUNNING', 'RBGRA06A', '99:00:24',
        '00:01:22');
    Insert into LOAD_INFO_ALL
       (TMSTP, PROGRAM, STATUS, GRP, LAG,
        CHKPT)
    Values
       (TO_DATE('02/08/2013 04:48:42', 'MM/DD/YYYY HH24:MI:SS'), 'REPLICAT', 'RUNNING', 'RBGRA06A', '98:30:24',
        '00:14:10');
    Insert into LOAD_INFO_ALL
       (TMSTP, PROGRAM, STATUS, GRP, LAG,
        CHKPT)
    Values
       (TO_DATE('02/08/2013 04:40:04', 'MM/DD/YYYY HH24:MI:SS'), 'REPLICAT', 'RUNNING', 'RBGRA06A', '98:30:24',
        '00:05:30');
    Insert into LOAD_INFO_ALL
       (TMSTP, PROGRAM, STATUS, GRP, LAG,
        CHKPT)
    Values
       (TO_DATE('02/08/2013 04:57:20', 'MM/DD/YYYY HH24:MI:SS'), 'REPLICAT', 'RUNNING', 'RBGRA06A', '98:30:24',
        '00:22:47');
    Insert into LOAD_INFO_ALL
       (TMSTP, PROGRAM, STATUS, GRP, LAG,
        CHKPT)
    Values
       (TO_DATE('06/03/2013 06:09:05', 'MM/DD/YYYY HH24:MI:SS'), 'REPLICAT', 'RUNNING', 'RBGRA06A', '98:26:43',
        '00:39:33');
    COMMIT;

    Pablolee wrote:
    with D as (select '98:59:23' X 
    from DUAL) 
    select X, TO_NUMBER(SUBSTR(X,1,2))*60+TO_NUMBER(SUBSTR(X,4,2))+TO_NUMBER(SUBSTR(X,7,2))/60 
    from D      
    SQL> with D as (select '108:59:23' X from DUAL)
      2  select X, TO_NUMBER(SUBSTR(X,1,2))*60+TO_NUMBER(SUBSTR(X,4,2))+TO_NUMBER(SUBSTR(X,7,2))/60
      3  from D
      4  /
    with D as (select '108:59:23' X from DUAL)
    select X, TO_NUMBER(SUBSTR(X,1,2))*60+TO_NUMBER(SUBSTR(X,4,2))+TO_NUMBER(SUBSTR(X,7,2))/60
    from D
    ORA-01722: invalid number
    SQL>
    Ramin Hashimzade

  • Convert java.sql.Timestamp to java.util.Calendar?

    What's the best way to convert java.sql.Timestamp to java.util.Calendar?

    Use Calendar's setTime(Date date) method.
    java.sql.Timestamp extends java.util.Date.
    -Roy

  • How to convert varchar to timestamp

    in the db , i have a column indtalledDate with datatype varchar-- and value is like 'Thu Dec 20 07:33:20 PST 2012'. Now i need to convert this to timestamp format-->20-DEC-12 07.47.49.463000000 AM . how can i do?
    can anyone pls help???

    >
    hi..Thanks for the quick reply. yes it worked. Now i do need to determine the day in month, quarter span, month span,year start date and year end date..
    something like below:
    to_date(add_months(trunc(installeddate,'q'),3)-1) - to_date(trunc(installeddate,'q')) as quarter_time_span
    any idea how to do this?
    You already have an idea of how to do that
    select trunc(sysdate, 'yyyy') year_start,
       add_months(trunc(sysdate, 'yyyy'), 12) next_year_start,
       trunc(sysdate, 'q') quarter_start,
       add_months(trunc(sysdate, 'q'), 3) next_quarter_start,
       to_number(to_char(sysdate, 'dd')) day_in_month,
       trunc(sysdate, 'mm') month_start,
       add_months(trunc(sysdate, 'mm'), 1) next_month_start from dual
    YEAR_START,NEXT_YEAR_START,QUARTER_START,NEXT_QUARTER_START,DAY_IN_MONTH,MONTH_START,NEXT_MONTH_START
    1/1/2012,1/1/2013,10/1/2012,1/1/2013,20,12/1/2012,1/1/2013

  • 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.

  • SQL Anywhere Error -157: Cannot convert '' to a timestamp(Send Date to SUP Server in IOS)

    Hi Every one,
       How to send DATE format to the sales_order table for order_date column  from iOS.
    I tried like this..
    @try {
            SUP105Sales_order *insertRow =[[SUP105Sales_order alloc]init];
            int32_t idValue =2671;
            int32_t custID =103;
            int32_t sales =506;
            insertRow.id_=idValue;
            insertRow.cust_id=custID;
            insertRow.order_date=[NSDate date];
            insertRow.fin_code_id=@"r1";
            insertRow.region=@"Hyd";
            insertRow.sales_rep=sales;
            [insertRow save];
            [insertRow submitPending];
            [SUP105SUP105DB synchronize];
        @catch (NSException *exception) {
            NSLog(@"Exception---%@",exception.description);
    In server log:
    2014-02-28 16:39:41.833 WARN Other Thread-182 [SUP105.server.SUP105DB]{"_op":"C","level":5,"code":412,"eisCode":"257","message":"com.sybase.jdbc3.jdbc.SybSQLException:SQL Anywhere Error -157: Cannot convert '' to a timestamp","component":"Sales_order","entityKey":"3210004","operation":"create","requestId":"3210005","timestamp":"2014-02-28 11:09:41.646","messageId":0,"_rc":0}
    I strongly believe the above error for because of Date format..
    Can any one help me me how to send date to database in SUP in iOS??

    I Found solution after long time, use Timestamp  datatype instead of Date datatype..it works for me..

  • 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?

  • Difference between timestamp oracle datatype as unix timestamp

    Hi
    We are having a column in our table as create_ts which is the time, the row is updated. We are in need to get this time in Pro*c as unix timestamp type to find out the oldest row from a set of rows.
    I found that the following query works when I convert to date and find out the difference.
    select TO_NUMBER((TO_DATE (TO_CHAR (CREATE_TS, 'YYYY-MON-DD HH24:MI:SS'),'YYYY-MON-DD HH24:MI:SS') - to_date('01.01.1970 00:00:00','dd.mm.yyyy HH24:mi:ss')) * 24 * 60 * 60 - TO_NUMBER(SUBSTR(TZ_OFFSET(sessiontimezone),1,3))*3600 ,9999999999) as timestamp from customer;
    However when I keep it as timestamp type I'm getting some error
    select TO_NUMBER((CREATE_TS - to_timestamp('01.01.1970 00:00:00','dd.mm.yyyy HH24:mi:ss'))* 24 * 60 * 60 *1000 - TO_NUMBER(SUBSTR(TZ_OFFSET(sessiontimezone),1,3))*3600000 ,9999999999999) as timeints from customer;
    ERROR
    ORA-30081: invalid data type for datetime/interval arithmetic
    30081. 00000 - "invalid data type for datetime/interval arithmetic"
    FYI: since if I convert to date type, we're losing the microseconds, we had to find the difference using the timestamp type.
    thanks

    When you take a difference between two timestamps, You dont get a number(like substracting dates). You get a string that has number of days,hours,minutes and seconds.
    You can break the string though,
    SQL> SELECT SUBSTR(today,1,30) today,
      2         SUBSTR(tomorrow,1,30) tomorrow,
      3         SUBSTR((tomorrow-today), INSTR((tomorrow-today),' ')+7,2) "SS",
      4         SUBSTR((tomorrow-today), INSTR((tomorrow-today),' ')+4,2) "MI",
      5         SUBSTR((tomorrow-today), INSTR((tomorrow-today),' ')+1,2) "HH",
      6         TRUNC(TO_NUMBER(SUBSTR((tomorrow-today),1, INSTR(tomorrow-today,' ')))) "Days"
      7    FROM (SELECT TO_TIMESTAMP(SYSDATE) today,TO_TIMESTAMP(SYSDATE+1) tomorrow FROM dual);
    TODAY                          TOMORROW                       SS MI HH       Days
    10-MAR-11 12.00.00 AM          11-MAR-11 12.00.00 AM          00 00 00          1
    SQL>
    SQL> G.

  • CS2 Doc Converted to CS3 takes 2+ Minutes to Open Every Time

    We are in the process of switching 34 users from ID CS2 to ID CS3 and are having file conversion nightmares. They need to re-use their old CS2 ad layouts but many users are complaining that the conversion to CS3 takes several minutes. In our test period we had noted that but once the doc was converted the subsequent file opening time in CS3 was greatly reduced. But it now appears that when some users are opening the converted and saved docs they are still experiencing the same file opening delays as when the docs were being converted from CS2. Then a different user will open the same doc and it will open immediately. We have tried to find a common setup or preference or plug-in issue that might be a problem, but so far have struck out. 6 users have brand new MacPros running Leopard 10.5.2 with all Adobe CS3 patches installed. This group uses identically configured everything and they still have inconsistent file opening behavior! Some open instantly and others take 2-5 minutes for the same file. We have noted similar inconsistency amongst our users who still have GS PowerMacs running Tiger 10.4.11. Their CS3 is patched and fully updated. Now I would expect there to be inconsistencies between the Tiger and Leopard G5 and Intel groups, but we see the same thing with the same file taking different amounts of time to open after having been converted and saved and then opened again with the same-configuration users, no matter what they are using.
    We use a Xinet file and print server and all users are supposed to work on files off the server so the working file stays up to date, but for testing we have been having them download the same files to their desktops and opening them. One of my test Macs is an Intel Mac running Tiger 10.4.11 and Adobe CS3 all updated and I use the same 3rd party plug-ins as everyone else. We only use two sets of 3rd party plug-ins - the Xinet WebNative and FullPress plug-ins and Extensis Suitcase X1 client Auto-Activation plug-in getting fonts from a Suitcase server.
    We don't have the problem if documents are created from scratch in CS3. Unfortunately, it will take a very long time to get to where we would never be using any of our old CS2-created files, so we need to figure out a workable solution. It is mainly a question of time, which is something you never have enough of before your press deadline and the users are balking at the amount of production time they are losing waiting for files to open. They have a tendency to force-quit InDesign before it can finish opening and then they have to deal with all the file recovery dialogues the next time. They are getting very frustrated.
    Has anyone run into this behavior or come up with a solution? If so I'd love to hear from you!
    Thanks, Laura K.

    Hi Kevin,
    I did some more trial and error testing since I posted my original message. This is what seems to be working:
    You can leave the Suitcase Auto Activation plug-in there, but if you go into its preferences make sure the box for "Activate fonts in embedded objects" is not checked.
    That made all the difference - so far. I need to try this on a couple more of my troubled Macs before I will declare victory!
    In the Suitcase Client prefs you should also turn off Suitcase's auto activation and let the application plug-in handle that. I read that somewhere else a couple days ago, maybe it was the Extensis forums? Can't remember. But that's how I have mine set on my test Macs. (one MacPro running Tiger and a MacBook Pro running Leopard)
    Hope that helps!
    Laura K.

  • Difference in timestamp values

    Hi,
    We have a project for like to like migration for R12 to R16, but ther are differences in the timestamp values calulated between the two enviornments
    The R12 Production server is 5 hrs head of R16 production server.
    i have applied the following formula to both the production report:
    Timestampdiff(SQL_TSI_MINUTE,TIMESTAMP '2009-07-06 12:12:12',TIMESTAMP '2009-08-07 11:11:11')
    the results are in Minutes:
    R12:44578
    R16:46019
    Is this because of the difference in server timing? or R16 has a feature to calulate the difference without considering the timezones, daylight saving etc which the R12 lacks, because when i checked which of the 2 difference is correct, the R16 differnce seems to be correct.
    Please share your thoughts on this as it is affecting large no .of reports.
    Many 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;
    /

  • How do I convert time from hours and minutes to decimal time

    I am making a spread sheet a work for payroll. I need to make a formula that converts the time from hours and minutes to decimal time. Please help

    Hi Taryn,
    I can't see much from the photo, but I assume your formula is similar to the one I've used below:
    The same formula is used in F4 and F6, and both return the same result (shown in F4).
    F4 was left on "automatic" cell format, and the column widened to accomodate the repeating decimal to the point where Numbers would begin displaying zeros.
    F6 was formatted as shown in the Cell Inspector to show only two decimal places.
    Neither of these is an "exact" decimal, as it is not possible to use a decimal fraction to "exactly" represent 1/6 (or 10/60).
    The likely reasons for yours showing a whole number of hours is a difference between your formula and the one shown in the example here, or a difference in the number of decimal places set in the cell's format.
    Regards,
    Barry
    PS: To take a screen shot:
    Place the mouse pointer at the top left corner of the area you want to nclude in the shot.
    Press shift-command-4.
    Use the mouse to drag a selection rectangle contining the part of the screen you want to include.
    Release the mouse button. (You'll hear the sound of a camera shutter 'snapping' the picture.)
    The screen shot will be saved to your desktop with the name 'screen shot' followed by the date and time.
    The image may be posted to the discussion using the same steps you used to post the photo above.
    B.

  • Convert java.util.Timestamp to a formatted java.util.date

    Hi,
    I am trying to convert a java.util.TimeStamp date from the DB to a formatted date object. So, how can I convert this TimeStamp into an hourly or daily format that will return me a java.util.Date object? I was trying to convert the TimeStamp using SimpleDateFormat and then parse out to a Date object, but this isn't working. This is what I need
    TimeStamp converted to an "Hourly" date object --> 12:00pm
    TimeStamp converted to a "Monthly" date object --> May

    Hi,
    I am trying to convert a java.util.TimeStamp date
    from the DB to a formatted date object. I don't know what a "formatted date object" is. Do you mean a String?
    So, how can
    I convert this TimeStamp into an hourly or daily
    format that will return me a java.util.Date object?I don't know what you mean when you say "...int an hourly or daily format that will return me a java.util.Date object". A format is a String, are you wanting to parse that into a java.util.Date object?
    I was trying to convert the TimeStamp using
    SimpleDateFormat and then parse out to a Date
    object, but this isn't working. This is what I
    need
    TimeStamp converted to an "Hourly" date object -->
    12:00pmThat's a String then?
    A java.sql.Timestamp extends java.util.Date. So if you've a Timestamp, then you can use it as you would a java.util.Date. If you want a String, then as you say use SimpleDateFormat with the appropriate format string.
    Good Luck
    Lee

Maybe you are looking for

  • Formatting Hard Drive to use with TM and Windows

    I hope this is not a strange question. I have new iMac with 500GB, and a Windows XP system that I'd like to use with my new eGO 1TB USB drive. Will this work: - Partition 750GB for Time Machine - Partition 250GB to allow my Mac to store files permana

  • Database Adapter in 11g

    is anyone know how to configure 'OutputCompletedXml' in SOA 11g Database Adapter? How to configure Toplink sequencing in JDeveloper SOA applicatoin(Database adapter generated mappings). Thanks --Sree                                                   

  • ITunes and keyboard backlight issues

    Hi, i know that this question has been asked before, but was not answered, so ill try again to see if anyone has a solution. When using iTunes, if i skip forward or backward a track, using either the iTunes GUI or the function buttons (F7 and F9) the

  • Layout Variant in FBL1N using new field

    Dear gurus, I'd like to ask for your help again, please. I've just added the field BSEG-FDGRP to the list of fields of FBL1N using transaction OBVU. When I run the report the field is correctly displayed but if I save the current layout and set it in

  • Assign Facsimile Document storage at PA30 with out Barcode.

    Hello SAP Gurus, We want to know weather we could maintain documents in Archive Link going by Extras Assign Facsimile Path, Because i tried doing the same but was not success full as it asks for Bar Code Entry, Can we manually select a file and store