473,473 Members | 2,009 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 12154
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.