Cassio
Well-known member
Here in Brazil we use the format dd-mm-yyyy and my windows is already configured that way.
When I use SQL Server 2000 Enterprise Manager to insert data, the date field format is also dd-mm-yyyy. But when I try to input data through VB.NET it only accepts the format mm-dd-yyyy.
It only works when the Date1 is like mm-dd-yyyy. Very strange.
When I use SQL Server 2000 Enterprise Manager to insert data, the date field format is also dd-mm-yyyy. But when I try to input data through VB.NET it only accepts the format mm-dd-yyyy.
Code:
strSQL = "INSERT Compras VALUES (" & CType(cmbProdutos.SelectedItem, ListItems).ID & _
"," & Int(txtQuantidade.Text) & "," & Int(txtUnidade.Text) & _
"," & CInt(txtTotal.Text) & "," & CType(cmbFornecedores.SelectedItem, ListItems).ID & _
"," & Date1 & ")"
It only works when the Date1 is like mm-dd-yyyy. Very strange.