Read data from sql database using datetime picker

前端 未结 5 1394
没有蜡笔的小新
没有蜡笔的小新 2021-01-16 15:29

How to read data from database using datetimepicker value. I have a datetimepicker and a datagridview in my form. I want to get data from Sql databse table with the selected

5条回答
  •  情歌与酒
    2021-01-16 16:17

    Try move a one space near at your "%) and I corrected the query. Try to figure out.

    Dim strSQL As String = "SELECT EMP_ID,EMP_NAME,AT_STATUS, " + _
         "AT_REMARK FROM ATTENDANCE " + _ 
         "WHERE Convert(Varchar(10), AT_DATE, 23) = " + _
         "('" & editdate.ToString("yyyy-MM-dd") & "') ORDER BY EMP_NAME ASC"
    

提交回复
热议问题