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
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