我有一个datepicker,我想根据从数据库中检索的日期更改值。
这是我到目前为止所尝试的内容。
1
rs.Open("select DATE_FORMAT(dateReceived,'%m-%d-%Y') as daterec from tblrequest
where refcode='TR-I-CGS-2016-1', cnn, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockPessimistic)
dateReceived.Value = rs.Fields("daterec").Value
2
rs.Open("select dateReceived from tblrequest
where refcode='TR-I-CGS-2016-1', cnn, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockPessimistic)
dateReceived.Value = rs.Fields("dateReceived").Value
这两种方法都没有得到我想要的结果。我需要的是当表单加载时dateReceived的值是从数据库获得的日期。谁能帮帮我吗。感谢