Vbs problem in SQl statement query

I wrote a query string with VBS,
which condition where there is a date comparison, but the database is the time format and I want to add directly in the query criteria in
time conversion function database fields, but tried several times without success, ask at how changed?
Time field name of the database is "DataTime" type is the type of time, is the kind of yyyy-MM-dd HH: mm : ss format
my program there just want a date variable data using the above format conversion finished, and I only date comparison of data variables,

I wrote pass the following statement

selece * from table where CONVERT (varchar (20), DateTime, 23) = ' "& Data &"'
Does the above statement what the problem is, how to write, thank you

Published an original article · won praise 0 · Views 32

Guess you like

Origin blog.csdn.net/zhbdly/article/details/104379010