title: How to compare time in sql query in two different formats(timestamp and java.util.date)?
body: <p>My sql query is generated by this java code :</p>
  
  <pre><code>public boolean generateFileForTable(java.util.Date lastSyncTime, NGMasterSyncData ngMasterSyncData, String fileName){
      StringBuffer query = new StringBuffer(200);
      query.append("Select ");
      query.append(ngMasterSyncData.getOperationModeCol());
      query.append(", ");
      query.append(ngMasterSyncData.getColumnList());
      query.append(" FROM ");
      query.append(ngMasterSyncData.getTableName());
      query.append(" WHERE ");
      query.append(ngMasterSyncData.getLastModifiedCol());
      query.append(" &gt; ? ");
  </code></pre>
  
  <p>Where the value inside <code>getLastModifiedCol()</code> is in time stamp format <code>(07-JUN-12 11.30.00.000000000 PM)</code> and in the prepared statement for ? , we are converting the time recieved <code>(11-06-2012 11-59-50) in java .util.sql</code>
  so basically i want to compare this time in timestamp format with the time i recieved in parameters <code>(last synn time -11-06-2012 11-59-50)</code>.</p>
  
  <p>How should i proceed ? what should i put in my prepared statement ?</p>