If Not IsPostBack Then . . Dim strConn As String = CType(Me.Master, MasterPage).connectString Dim objConn As New MySqlConnection(strConn) Dim objDS As New DataSet Dim strSql As String strSql = "SELECT DISTINCT savedate FROM kpi_mrpactionsvalue " & _ " ORDER BY savedate DESC LIMIT 10" Dim daDates As New MySqlDataAdapter(strSql, objConn) daDates.Fill(objDS, "dtDates") For Each rowDate In objDS.Tables("dtDates").Rows ddlDates.Items.Add(rowDate("savedate")) Next . .This works the way I expect (the DDL is populated with the correct 10 dates)
< asp:DropDownList ID="ddlDates" runat="server" Height="20px" Width="107px" DataSourceID="mysqldatasource" DataTextField="savedate" DataValueField="savedate" > < /asp:DropDownLis t > < asp:SqlDataSource ID="mysqldatasource" runat="server" ConnectionString="< %$ ConnectionStrings:ConnectionString % >" ProviderName="< %$ ConnectionStrings:ConnectionString.ProviderName % >" SelectCommand="select distinct savedate from kpi_mrpactionsvalue order by savedate desc limit 10" > < /asp:SqlDataSource >This also produces a DDL with the correct 10 dates. However, the values show up as DateTime. The Time portion is 12:00:00 AM for all the rows in the DDL. The backend is MySql and I've verified that the field in question is actually a Date rather than a DateTime (I did a visual verification and I also put the SelectCommand as a parameter into a VFP SQLEXEC command with the resulting cursor having Date values)