Question

Oracle Adding Milliseconds to time

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. How to get Oracle to use multiple date formats in …
    I am trying to manually duplicate the results of a query some software at my job runs. I have attached a sample query below. When the software runs the query it returns (desired result): '001-001-01-JAN-06-0-6-6-6','2006-01-06 00:00:00' When I run the query manually in SQLPlus I get: …
  2. How to set time
    In my program I have v_date Date; v_minutes NUMBER; ... begin v_date = my_pkg.date_time; v_minutes := TO_NUMBER (TO_CHAR (v_date, 'MI')); ... if v_minutes < 30 then set some different time (the same hours but change the minutes) end if end How do I set the time?
  3. oracle insert
    I have table CREATE TABLE work_current ( work_current_ID NUMBER(18) NOT NULL, work_NUMBER VARCHAR2(12 BYTE) NOT NULL, current_CODE_ID NUMBER(18) NOT NULL, current_DATE DATE NOT NULL, COMMENTS VARCHAR2(1…
  4. oracle plsql
    in regards to http://www.oraclesolved.com/Q_25463934.html I have created Create or replace procedure moos.Insert_pps_procedure (v_work_number varchar2, v_current_code number, v_current_date varchar2, v_comments varchar2, v_create_date varchar2, v_principal_amt numb…
  5. oracle query
    select distinct(count (sid)),nvl(sum(amount),0),'Current Session ==> ' FROM ledger WHERE descr = 'PAYMENT RECEIVED' AND ldate BETWEEN (to_date('01-apr-'||to_char(to_number(to_char(sysdate,'YYYY'))-1),'dd-mon-yyyy')) AND LAST_DAY (ADD_MONTHS (SYSDATE, 0)) On d…

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

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:

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

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

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

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