I'm trying to work in a query to find results by date range [from - to], so I use a textbox so that enter these values and put them in dd / mm / yyyy format with javascript, my problem is that when I give it to look for it, it marks me the following message;
MSJ ERROR: The conversion of a varchar data type to a datetime data type resulted in an out-of-range value
BUTTON
<asp:TextBox ID="txtDate1" runat="server" ReadOnly="false"></asp:TextBox>
<asp:TextBox ID="txtDate2" runat="server" ReadOnly="false"></asp:TextBox>
CONSULTATION
SQLTable = "SELECT * FROM ErrorLog ";
SQLTable += "WHERE Date between '" + txtDate1.Text + "'";
SQLTable += " AND '" + txtDate2.Text + "'";