kennedymr2
Programmer
I am having a problem formating an sql statement which is shown below.
When i run his sql i do not get any records.But i do have some records in the day in question.
I guess it is due to the xtime having a time on the end of it.??
xtime is a field in an mssql database as a datetime format
??How do i format the xtime in the sql string as format$(xtime,"mm/dd/yyyy" in both the >= and the <=
Appreciate some help!!!
Wherex = "Where xtime >= '" & Format$(DTPicker1.Value, "mm/dd/yyyy" & "' "
Wherex = Wherex & " and xtime <= '" & Format$(DTPicker2.Value, "mm/dd/yyyy" & "' "
Wherex = Wherex & " and cid >= " & cf & " and cid <= " & ct
When i run his sql i do not get any records.But i do have some records in the day in question.
I guess it is due to the xtime having a time on the end of it.??
xtime is a field in an mssql database as a datetime format
??How do i format the xtime in the sql string as format$(xtime,"mm/dd/yyyy" in both the >= and the <=
Appreciate some help!!!
Wherex = "Where xtime >= '" & Format$(DTPicker1.Value, "mm/dd/yyyy" & "' "
Wherex = Wherex & " and xtime <= '" & Format$(DTPicker2.Value, "mm/dd/yyyy" & "' "
Wherex = Wherex & " and cid >= " & cf & " and cid <= " & ct