Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Manipulating and Comparing Time (ADF)

451122Sep 2 2005 — edited Sep 6 2005
I have an Oracle Database field of type TIMESTAMP, in which I am storing just the time (eg 10:30). I understand that when I commit to the database, since I am not specifying any date specific information, oracle uses the first day of the current month as the default.

My question is, how do I compare just the time aspect of the timestamp field? Previously in entity objects, I have been taking the ‘oracle.jbo.domain.Date’ and then converting to ‘java.util.GregorianCalendar’ and finally accessing the time in milliseconds using .getTimeInMillis() (data return type - Long). This millisecond value is then used as a mechanism for comparing two different times. However I am not sure what type of Java calculation is performed based on the Calender class. Is the date also being considered, especially in the case where there could be two different default dates inherent as part of different rows?


Regards,

Anora April

JDeveloper 10.1.2.1 (Build 1913)
Oracle 10g DB (10.1.0.2.0)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 4 2005
Added on Sep 2 2005
3 comments
573 views