mferrisi
08-03-2007, 10:46 AM
I am trying to run a query that returns the data only on certain dates. I've done it this way before with strings (ie to return string values from the datadase) but it doesn't seem to like the string with dates that I create. Am I missing something?
My error message is:
"The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value."
I don't think there is an Array List in VBA?
t = SDate & ", " & FDate & ", " & EDate
cmd.CommandText = "SELECT hist_date, hist_price " & _
"FROM history " & _
"WHERE (name='TheName') AND (type='accounting') " & _
AND (date ='" & t & "')"
My error message is:
"The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value."
I don't think there is an Array List in VBA?
t = SDate & ", " & FDate & ", " & EDate
cmd.CommandText = "SELECT hist_date, hist_price " & _
"FROM history " & _
"WHERE (name='TheName') AND (type='accounting') " & _
AND (date ='" & t & "')"