B
brisco5
I'm using a UDB database, where the timestamp of a Date field returns
me dates with milliseconds up to 6 decimals:
2005-02-25 11:50:11.579411
I'm looking for two possible ways to deal with time stamp.
1. I've tried creating a Simple Date Format object with this time
stamp, but I don't know how to save the milliseconds with all 6 digits.
I can store up to 3 ("SSS"), but no more than that
Tried:
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd
HH:mm:ss.SSSSSS");
but that causes havoc.
2. Write a query that'll truncate the time stamp and lop off the final
3 digits. This query would need to be basic enough to work in MSSQL,
Oracle, and UDB without any modifications.
Any ideas?
me dates with milliseconds up to 6 decimals:
2005-02-25 11:50:11.579411
I'm looking for two possible ways to deal with time stamp.
1. I've tried creating a Simple Date Format object with this time
stamp, but I don't know how to save the milliseconds with all 6 digits.
I can store up to 3 ("SSS"), but no more than that
Tried:
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd
HH:mm:ss.SSSSSS");
but that causes havoc.
2. Write a query that'll truncate the time stamp and lop off the final
3 digits. This query would need to be basic enough to work in MSSQL,
Oracle, and UDB without any modifications.
Any ideas?