Title: Timestamp support for nanosecond?

Hello,
We should save into a database table some timestamp values.
The documentation do not provide any information about nanosecond within a TIMESTAMP, but the size of the MILISECOND in the type is big enough to contain it....does it?

As an input, we have a double like "8476.12" with represent the delta in [ms] from an other date "2003.14.03:12:45:02".
We use a java.sql.Timestamp rather than Date to hold this time (should handle nanosecond !)...here is the code to generate the Timestamp (with jdk.1.4.X).

Timestamp instant = new Timestamp(startDate.getTime()+new Double(inputtime).longValue())
instant.setNanos(instant.getNanos()+1234); //to be sure that timestamp has the nanoseconds within

We then insert this instant time inside the SAPDB database using the sapdb jadbc driver.
st.setTimestamp(3, instant);

Does the sapdb TIMESTAMP store the nanosecond value of a java.sql.Timestamp object?
Is there a better way to store this date/time with nanosecond information into a SAPDB instance?

Thank a lot for any help

Cedric


Cedric Cuche
Software Development

Chemspeed Ltd.
Rheinstrasse 32
CH-4302 Augst
phone: +41 (61) 816 95 00
fax: +41 (61) 816 95 09 
e-mail:
[EMAIL PROTECTED]
visit our web-site:
http://www.chemspeed.com

<<Cedric Cuche.vcf>>

BEGIN:VCARD
VERSION:2.1
N:Cuche;Cedric
FN:Cedric Cuche
ORG:Chemspeed Ltd.;R & D
TITLE:Mister
TEL;WORK;VOICE:0041 61 815 33 73
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20020923T085054Z
END:VCARD

Reply via email to