Ce que tu peux faire, c'est :
Dim queryString112 As String = "SELECT CONVERT(VarChar, DateEnr, 103) AS DateEnr FROM QteReel WHERE CONVERT(VarChar, DateEnr, 103)=" & yearSelect.SelectedValue & "Group by CONVERT(VarChar, DateEnr, 103) order by CONVERT(VarChar, DateEnr, 103) desc"
Si tu as mis le Group by pour ne pas avoir les doublons, tu peux faire comme ça :
Dim queryString112 As String = "SELECT DISTINCT CONVERT(VarChar, DateEnr, 103) AS DateEnr FROM QteReel WHERE CONVERT(VarChar, DateEnr, 103)=" & yearSelect.SelectedValue & " ORDER BY CONVERT(VarChar, DateEnr, 103) DESC"
Sinon ta ListBox te renvoie bien la valeur qu'il te faut ?
Partager