Comment comparer une duree d'une table SQL a "01:30:00"
Bonjour, voila mon problème c'est que je n'arrive pas a comparer une duree dans une table SQL a une duree donné "01:30:00".
Voici mon code
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| while( Résultat.next() ) {
if (Résultat.getString("et_duree")== "01:30:00"){
la=138;
taille = "width=138";
}else{
la=300;
taille = "width=300";
}
JLabel epts = new JLabel("<html><table border=2 ><td align='center' "+taille+">"+Résultat.getString("ue")
+" "+Résultat.getString("nom_mat")
+"<br>"+Résultat.getString("nom_gr")
+" "+Résultat.getString("nom_salle")
+"<br>"+Résultat.getString("et_debut")
+" - "
+Résultat.getTime("et_duree")
+"<br>"+Résultat.getString("nom_prof")
+"</td></table></html>");
frame.add(epts);
epts.setBounds(ht,148,la,80);
ht=ht+600;
} |
Le pire dans tous cela c'est qu'en je mais dans le "if" 1==1 ca fonctionne mais quand je mets Résultat.getString("et_duree")==Résultat.getString("et_duree") ca marche pas bizard pout tant c'est la meme chose aussi.
Merci d'avance