title: JDBC ERROR: operator does not exist: date = integer
body: <pre><code>    String checkAvailable_flight = String.format("SELECT Flightid, flightdate,"
              + " origin, destination FROM flight"
              + " WHERE  Flightdate::Date = %s  AND origin = %s"
              + " AND destination = %s;", date_, origin_, destination_);
  
      ResultSet rs = stmt.executeQuery(checkAvailable_flight);
  
      if (!rs.next()) {
  
          System.out.println("no data inserted");
      } else {
  
          do {
              int flightid = rs.getInt("flightid");
              String date = rs.getString("flightdate");
              String origin = rs.getString("origin");
              String destination = rs.getString("destination");
  
              System.out.printf("%-10d %5s %5s %7s\n",flightid, date, origin, destination);
  
          } while (rs.next());
      }
  </code></pre>
  
  <p>Error(s) occurred:</p>
  
  <pre><code>SQLException : ERROR: operator does not exist: date = integer
    Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
    Position: 86
  SQLState : 42883
  SQLCode : 0
  </code></pre>
  
  <p>hello, i working on JDBC and wanna execute the sql query and print out the table ..but i got the error above..</p>
  
  <p>i try to casting the flightdate in another way, like:</p>
  
  <pre><code>CAST(Flightdate AS TEXT) LIKE '2013-04-12%' 
  </code></pre>
  
  <p>but the error still occurred....</p>
  
  <p>any suggestion will appreciate it..</p>