Question

Asked on 2009-09-23 at 06:37:19ID: 25463747

Oracle Adding Milliseconds to time

by: Extreme66500

Rating9.2Excellent

Hi, I have the following query, that for now displays the same time twice with milliseconds. I want the second column to be the first columns time, plus 25 milliseconds. desired output below...

SELECT TO_CHAR(j.trade_time, 'yyyy-mm-dd hh24:mi:ss.ff3') mtime,
TO_CHAR(j.trade_time, 'yyyy-mm-dd hh24:mi:ss.ff3') "mtime + 25 milliseconds"
FROM xxxx.jmctradesv2 j
WHERE j.trade_time > TRUNC(SYSDATE - 1);

         MTIME      mtime + 25 milliseconds
1      2009-09-22 09:30:01.056      2009-09-22 09:30:01.081
2      2009-09-22 09:30:01.406      2009-09-22 09:30:01.431
3      2009-09-22 09:30:01.486      2009-09-22 09:30:01.511
4      2009-09-22 09:30:01.514      2009-09-22 09:30:01.539
5      2009-09-22 09:30:02.011      2009-09-22 09:30:02.036

  1. Need to know Oracle CPU numbers for October …
    I am working remotely and need to identify the ZIP files containing Oracle CPUs bby the patch number. Specifically, I need to know what the CPU numbers were for the October 2008 and January 2009 patches. Please help. Thank you.
  2. Should I use to_char over trunc when convertin…
    I have two queries below. The first uses trunc, the second to_char. I notice the trunc query finishes in 8 seconds on a 1 M row table as opposed to to_char finishing in 7 seconds. Why does to_char perform better? Is the performance great enough that I would be better off using to_char on our transaction based system? I like trunc better so please l…
  3. oracle, 10, databases, case adding dates i…
    folks I am having a problem with my below case that doestn display case when FREQUNIT < 7 then to_char(TARGSTARTDATE + 4,'dd-mm-yyyy hh24:mi') when FREQUNIT < 14 then to_char(TARGSTARTDATE + 7,'dd-mm-yyyy hh24:mi') when FREQUNIT < 30 then to_char(TARGSTARTDATE + 7,…
  4. Adding 24 hours to storage time
    I need to add 24 hours time to the existing time. How to add 24 hours in HH24:MI format
  5. Record count on Database Block
    Hi all, I have 2 canvas (1 canvas having database block items ,2nd having control block items & FIND button also in Control block), My requirement is when i select any one of the lov and click on the find button(in 2nd canvas , control block canvas) then it navigates to the database block canvas and displays records, at that time i want to …

Solution

Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.

About this Solution
View This Solution - Start Your 30 Day Free Trial
Zone
General
Tags
Participating Experts
2
Solution Grade
A

Replies

 by: shru_0409

Posted on 2009-09-23 at 07:23:23ID: 28258208

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by:

Posted on 2009-09-23 at 07:34:19ID: 28258209

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: Extreme66

Posted on 2009-09-23 at 07:34:52ID: 28258210

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: Extreme66

Posted on 2009-09-23 at 07:35:45ID: 32742777

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: sdstuber

Posted on 2009-09-23 at 07:37:00ID: 28258211

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

Stay Connected

Oracle Around the Web

The latest Oracle news, tips, and tricks

Oracle Unveils Netra SPARC T3 Servers

New Carrier-Grade Blade and Rackmount Servers Deliver Better Performance, Density and Power Efficiency for the Communications Industry ...

read more

Oracle fixes 21 flaws in Java SE, Java for Business

Oracle is fixing 21 flaws in its Java SE and Java for Business products in its February critical patch update issued this week ...

read more

Obama’s Silicon Valley “Tech Supper”

Why was he there? Who wasn’t invited and why? What did they talk about? Why was he really there? These are the questions being debated ...

read more

Featured Oracle Experts

slightwv

slightwv has answered more than 2,000 Oracle questions and oversees database management within the U.S. Government. Slightwv

sdstuber

A regular presenter at the Collaborate conference, Oracle developer sdstuber is a top expert in PL/SQL and Oracle 9, 10 and 11. sdstuber

Testimonials

What users are saying about our experts

"The Oracle gurus provide answers, solutions and valuable workarounds"

User: schwertner

"Wow! Excellent, valuable explanation. Hats off to you"

User: aseshu70

"Solution worked fantastic and performs excellent! Thanks heaps"

User: klausbrandlhuber

Top Experts

  1. slightwv

    2,000

    0 points yesterday

    Profile

BrowseBecome an Expert