Welcome Guest ( Log In | Register )


 
 
 
 
 
 

 
 
Oracle 

Performance Tuning Reference poster
 
Oracle training in Linux 

commands
 
Oracle training Weblogic Book
 
Easy Oracle Jumpstart
 
Oracle training & performance tuning books
 
Burleson Consulting Remote DB Administration
 
 
 
Reply to this topicStart new topic
> SQL Query coding, Converting a point of time in milliseconds
Janardanyy
post Sep 22 2017, 02:35 AM
Post #1


Newbie
*

Group: Members
Posts: 1
Joined: 22-September 17
Member No.: 52,180



Requirement :
each time the query runs the first tb1.ORIGINATIONTIME is to be taken in milliseconds of date converted last Friday at 00:00:00 time, and second tb1.ORIGINATIONTIME is to be taken in milliseconds of date converted to Thurs day at 23:59:59.

Case Example:

I have ran on 30-Jun-2017(Friday), so the first tb1.ORIGINATIONTIME should be 23-Jun-2017 at 00:00:00 and second tb1.ORIGINATIONTIME to be taken 29-Jul-2017 at 23:59:59.

Query:
select tb1.OID,
tb1.CURRENTSTATETYPE,
from AXWAYIC.MESSAGES tb1,AXWAYIC.MESSAGESTATES tb2 where tb1.OID=tb2.MESSAGEOID
and tb1.ORIGINATIONTIME >= 1498156200000 and tb1.ORIGINATIONTIME <= 1498760999000
Go to the top of the page
 
+Quote Post
burleson
post Sep 22 2017, 07:35 AM
Post #2


Advanced Member
***

Group: Members
Posts: 13,577
Joined: 26-January 04
Member No.: 13



Hi Janardanyy, and welcome to the forum!

You can get milliseconds in oracle sql like this:

http://www.dba-oracle.com/t_timestamp_math_elapsed_times.htm

Good luck!


--------------------
Hope this helps . . .

Donald K. Burleson
Oracle Press author
Author of Oracle Tuning: The Definitive Reference
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 23rd October 2017 - 02:01 PM