Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21089

Date error

$
0
0
Hi

I may be posting this question again . I am using SQL Database 2005.

I have written the below code , it is giving me error "The conversion of a Char DataType to a datetime data type resulted in
an out-of-range datetime value."

dtpicker1.value = 19/02/2013

rs.Open "Select distinct(Shiftcode) from shift where effectivefrom=(select max(effectivefrom) from shift where effectivefrom <='" & Format(DTPicker1.Value, "dd/MM/yyyy") & "')", cnn1, adOpenDynamic, adLockOptimistic, adCmdText

Thanks

Viewing all articles
Browse latest Browse all 21089

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>