Hi,
I'm having trouble in getting time difference. Any ideas ?
Hashtable ht = new Hashtable();
public void method1(int record) {
Date date1 = new Date();
SimpleDateFormat sdf1 = new SimpleDateFormat( "MM/dd/yyyy hh:mm:ss" );
ht.put(new Integer(record), sdf1.format(date1).toString());
}
public void method2(int record) {
Date date2 = new Date();
SimpleDateFormat sdf2 = new SimpleDateFormat( "MM/dd/yyyy hh:mm:ss" );
String currentDateTime = sdf2.format(date2).toString();
String recordLockedDateTime = lockedRecords.get(new Integer(record));
//
How to compare time difference between currentDateTime and recordLockedDateTime ? }
Thanks in advance.