This is my query in sql server
INSERT INTO dbo.KaunselingDT (NoKaunselor, NoPerakuan, Date)VALUES('123', '456', '14 / Oktober / 2014')
And this is my Save() button in VB.Net
sql = "INSERT INTO dbo.KaunselingDT (NoKaunselor, NoPerakuan, Date)" _ & "VALUES('" & Me.txtNoKaunsDaftar.Text & "', '" & Me.txtNoAkuanAmalan.Text & "', '" & Me.lblDate.Text & "')"
How to change the lblDate to smalldatetime data type?
Dim formatInfo As New DateTimeFormatInfo() formatInfo.ShortDatePattern = "dd/MM/yyyy" formatInfo.DateSeparator = "/" Dim objDate As DateTime = Convert.ToDateTime(Me.lblDate.Text, formatInfo)</pre>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)