src/com/shrewdify/diaroser/utils/DbHelper.java
public  String[] removeSession(long lastAccessTime) throws SQLException{
		List<String> list=new ArrayList<String>(); 
		if (connection != null) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
			Date d=new Date(lastAccessTime);
			psGetExpiredSessions.setString(1, sdf.format(d));
			ResultSet resultSet = psGetExpiredSessions.executeQuery();
			while (resultSet.next()) 
				list.add(resultSet.getString(1));
			psStaUpd2.setString(1, sdf.format(d));
			psStaUpd2.executeUpdate();
			resultSet.close();
		}
		return list.toArray(new String[]{});
	}
/**
	 * 
	 * @param lastAccessTime // Last accessed time.
	 * @return the Array of session Id removed from database.
	 * @throws SQLException
	 * 
	 * It removes all the session Values which are having last access time less then the LastAccessTime.
	 */
@param lastAccessTime // Last accessed time.
@return the Array of session Id removed from database.

It removes all the session Values which are having last access time less then the LastAccessTime.
@param lastAccessTime // Last accessed time . @return the Array of session Id removed from database . It removes all the session Values which are having last access time less then the LastAccessTime .
public  String[] removeSession(long lastAccessTime) throws SQLException{
		List<String> list=new ArrayList<String>(); 
		if (connection != null) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
			Date d=new Date(lastAccessTime);
			psGetExpiredSessions.setString(1, sdf.format(d));
			ResultSet resultSet = psGetExpiredSessions.executeQuery();
			while (resultSet.next()) 
				list.add(resultSet.getString(1));
			psStaUpd2.setString(1, sdf.format(d));
			psStaUpd2.executeUpdate();
			resultSet.close();
		}
		return list.toArray(new String[]{});
	}
public String [ ] removeSession ( long lastAccessTime ) throws SQLException { List < String > list = new ArrayList < String > ( ) ; if ( connection != null ) { SimpleDateFormat sdf = new SimpleDateFormat ( "yyyy-MM-dd HH:mm:ss" ) ; Date d = new Date ( lastAccessTime ) ; psGetExpiredSessions . setString ( 1 , sdf . format ( d ) ) ; ResultSet resultSet = psGetExpiredSessions . executeQuery ( ) ; while ( resultSet . next ( ) ) list . add ( resultSet . getString ( 1 ) ) ; psStaUpd2 . setString ( 1 , sdf . format ( d ) ) ; psStaUpd2 . executeUpdate ( ) ; resultSet . close ( ) ; } return list . toArray ( new String [ ] { } ) ; }
@param lastAccessTime // Last accessed time.
@param lastAccessTime // Last accessed time .