Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6836411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:21:08+00:00 2026-05-26T23:21:08+00:00

is there any way in oracle to calculate the difference between two time stamps

  • 0

is there any way in oracle to calculate the difference between two time stamps value with time zones in oracle sql plus as it is not possible to use timestampdiff or datediff inside oracle.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:21:09+00:00Added an answer on May 26, 2026 at 11:21 pm

    Consider the following in case you need the number of milliseconds between two timestamps:

      create or replace Function msecBetween
       (ts1 timestamp with time zone,
        ts2 timestamp with time zone,
        numDec number default 0
       )
      Return Number is
        i INTERVAL DAY(3) TO SECOND(3) := ts2 - ts1;
      Begin
        return round (
          +     extract( day    from i )*24*60*60*1000
          +     extract( hour   from i )*60*60*1000
          +     extract( minute from i )*60*1000
          +     extract( second from i )*1000
        , numDec);
      End;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way in Oracle within an SQL query to reference a column
New to SQL. Using oracle sql developer Version 3.1.07. Is there any way to
Is there any way to add dates/times that will be portable between Oracle and
Is there any way in Oracle to determine whether a package has state or
is there any way in Oracle, to get only the dd-mm-yyyy part from an
Is there any way to stop or terminate long running Oracle query in JDBC
Is there any other way to get datetime field from oracle database in 24hour
is there any way, to restrict hibernate not to create connection of its own(what
Is there any way to programmatically differentiate between what caused an IOException? For example
Is there any way to force oracle to use index except Hints?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.