TimeStamps difference
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Henry_Sanchez
Posted On:   Friday, November 9, 2001 01:13 PM

Can anyone tell me how I can compare the hours between two timestamps in java?
I'm comparing the timestamp from an Oracle database and the current system time.
Any example will be appreciated.
Thanks

Henry S.

Re: TimeStamps difference

Posted By:   Naveed_Azhar  
Posted On:   Friday, November 9, 2001 09:45 PM

Hi Henry,
The following code prints the difference of time ( in hours ) between a Timestamp and currect system time.

System.out.println( (System.currentTimeMillis() - timestamp1.getTime()) / ( 1000 * 60 * 60 ) );

naveed@hotmail.com

Re: TimeStamps difference

Posted By:   Bernie_Acs  
Posted On:   Friday, November 9, 2001 01:31 PM

Search for the NLS_DATE_FORMAT in the Search box to the upper right.

locate and look over the reply posted for following question header:

JDBC and ORACLE StoreProcedure ??

Topic: JDBC

justin , Oct 25, 2001 [replies]



The examples and discussion will likely cover your question as well.
About | Sitemap | Contact