473,386 Members | 1,668 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

10g timestamp

ts
In 10g why can I not get a 6 digit millisecond timestamp. Here is my Sql.

Select Current_Timestamp(6) from dual;
The milliseconds always looks like .931000.

-thanks


Jul 19 '05 #1
1 12152
Hello.

It is known problem of Oracle DB on Wintel (Windows and/or Intel) platoform.
Mainly it is because of bad timer resolution in Windows(NT) on Intel
platform - 1/100 of second (10 milliseconds).
We faced with the same problem with Oracle 9i. We solved it just by creating
special stored function - GetSysTimeStamp.
We use simple counter. I mean - seqnece from 0 to 999 to provide additional
digits (the similar way is used in IBM DB2 on Wintel platform).
The example:

create or replace function GetSysTimeStamp return timestamp
is fraction_str varchar(50);
time_str varchar(50);
seq_nectval number;
begin
select XXX_FRACTION_CTR.nextval
into seq_nectval
from dual;
time_str:=to_char(systimestamp,'YYYY-MM-DD-HH24.MI.SSX');

fraction_str:=to_char(to_number(substr(to_char(sys timestamp,'ff'),0,3))*1000
+ seq_nectval);
return to_timestamp(time_str||fraction_str, 'YYYY-MM-DD-HH24.MI.SSXFF');
end;

Then we replaced SYSTIMESTAMP with our GetSysTimeStamp.
The results looks like:

..931000
..931001
..931002
..931003
..942000
..942001
..942002
etc.

If you find other solutioins please let me know (please write me to dima_ben
@ ukr.net).

WBR,
Dmitry.
"ts" <to******@cox.net> wrote in message
news:Eiu4d.289102$Lj.237847@fed1read03...
In 10g why can I not get a 6 digit millisecond timestamp. Here is my Sql.

Select Current_Timestamp(6) from dual;
The milliseconds always looks like .931000.

-thanks

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: perplexed | last post by:
How do you convert a user inputted date to a unix timestamp before insterting it into your database? I have a form, with a textfield for a date that the user inputs in the format mm-dd-yyyy and...
2
by: Astra | last post by:
Hi All I know an SQL Server timestamp seems to be as useful as rocking horse for show jumping, but I'm hoping you know a 'fudge' to get me round a problem or at least confirm that it isn't...
2
by: rong.guo | last post by:
Hello Group, I am having a really weird problem... Can anyone tell the difference between Query 1 and Query 2 below? Why Query 2 excludes '2/28/2005'? Many thanks! create table a...
7
by: mybappy | last post by:
Hi: I am trying to use timestamp field of SQL Server to maintain concurrency. My problem is how do I store the timestamp value in my webform. The hidden field does not work as I get some cast...
2
by: Zygo Blaxell | last post by:
I have a table with a few million rows of temperature data keyed by timestamp. I want to group these rows by timestamp intervals (e.g. every 32 seconds), compute aggregate functions on the...
5
by: Prabu Subroto | last post by:
Dear my friends... I created some tables with field timestamp (datatype also timestamp). I mean, I want to have the data when each record inserted or modified in the tables. on MysQL, I just...
2
by: Russell Smith | last post by:
Timestamps support infinity. However if appears dates do not. When timestamps are cast to dates, there is no output. Is this an acceptable option or not? Below are a number of examples...
2
by: Reddog | last post by:
Hi all, I have a number of tables that I want 'timestamped' with both a modified and created 'timestamp' field. Ideally both fields should 'work if ignored' in insert and updates, thus the...
22
by: Mal Ball | last post by:
I hope I have the right forum for this question. I have an existing Windows application which uses a SQL Server database and stored procedures. I am now developing a web application to use the same...
7
by: JJ | last post by:
How do I set one field to have the updated timestamp, and another to have the created timestamp? I want to do this directly from code generated from DB Designer if possible?! JJ
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.