Amigos estou usando o jCalendar e quando executo o código a data retorna em um JOptionPane isto dd/MM/yyyy o que estou fazendo de errado ???
private void bPesquisarActionPerformed(java.awt.event.ActionEvent evt) {
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
String data = sdf.format(new Date());
String dataInicial = tDataInicial.getDateFormatString();
String dataFinal = tDataInicial.getDateFormatString();
JOptionPane.showMessageDialog(this, dataInicial);//AQUI NESTE JOPTION PANE ESTA RETORNANDO dd/MM/yyyy
String sql = "SELECT troca.tro_cod AS troca_tro_cod, troca.tro_data AS troca_tro_data, troca.tro_km AS troca_tro_km, troca.tro_veiculo AS troca_tro_veiculo, troca.cli_cod AS troca_cli_cod FROM troca WHERE troca.tro_data > '#1' AND troca.tro_data < '#2'";
sql=sql.replace("#1", dataInicial);
sql=sql.replace("#2", dataFinal);
ResultSet rs = new Banco().con.consultar(sql);
JOptionPane.showMessageDialog(this, rs);
mostrarRelatorio(sql,"C:\\Users\\cyberlacs\\Desktop\\ControlOil\\relatorios\\TrocaPorPeriodo.jasper");
}
Fico no aguardo muito obrigado