title: Insert jspinner time value to database
body: <p>I have two jspinners. the one contains an HH:mm format and the other one is a simple number(int) spinner.</p>
  
  <p><a href="https://i.stack.imgur.com/PwoGU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PwoGU.png" alt="enter image description here"></a></p>
  
  <p>when SAVE button clicked I want to update a database table that contains the timeLimit (type time) and attempts (type int) columns. But I dont know how to save a jspinner value to a time type in my database. </p>
  
  <pre><code> String update = "Update qbank SET timeLimit = ? and attempts = ? where qbankID = ?";
              preparedStatement = connection.prepareStatement(update);
  
              preparedStatement.setTime(1, spinnerTime.getValue()); 
  </code></pre>
  
  <p>i tried the code above but the last part has an error saying spinnerTime.getValue is an object and setTime() requires a Time. How can I convert and object to time? or is there other way to insert a jspinner with time value to my database? any help would be appreciated!</p>