My following code is only retrives number month(1,2,3,4....12) and not month name(January,February,.....December). Can anyone help me to retrieves month name in sql query. Before that i had try using function datepart, Monthname and date_format but i still din get my answer.Thanks
con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = C:\YS.mdb"
con.Open()
sql = "SELECT DISTINCT MONTH(dates) As [dates] FROM summary WHERE plants = '" & yieldsummary.cbPlant.Text & "' AND Year(dates) = " & cbYear.Text & "AND line = '" & cbLine.Text & "'"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "summary")
con.Close()