Posted on: 1/22/2014 3:44:48 PM | Views : 663

Being a newbie, I am having a hard time understanding the SQL database date format compared to the date I enter on my webpage.  Also, I need to compare the 2 dates to see if they are the same.  After researching it, I still don't get it.  Help!
Okay - I have a form with a date field.  I want to see if the date appears in a SQL database table.  On the webpage, I am using the Ajax CalendarExtender, with the date in MM/dd/yyyy format.  In the SQL database, the date is a date field and format yyyy-MM-dd.  Here is my code:
Protected Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles TextBox1.TextChanged Dim commandText As String 'TextBox1 is the date field MM/dd/yyyy Dim vbegin As String = Convert.ToDateTime(TextBox1.Text.ToString()) 'If I enter 12/25/2013, message box shows 12/25/2013 MsgBox(vbegin) Using DataConnect ...

Go to the complete details ...