i have to use like keyword in my query in ASP

while using it in analyzer i am getting the result but when i am using it on page i m not getting the result of a simple.

Qery is :

select checktime from checkinout where checktime like '*"&any_dt&"*'

any_dt is a date in mm/dd/yyyy format.

this is working fine in analyzer but not on ASP Page.

why is it happening i dont know.

Please help me out as soon as possible.

thanx a lot in advance.

hi,

There change your query with following query:

select checktime from checkinout where checktime like '%"&any_dt&"%'

hi,

There change your query with following query:

select checktime from checkinout where checktime like '%"&any_dt&"%'

I have already apllied tis too.
But it also is not working.

thanx for reply.

give some other solution if you can.

thanx again in advance

Hi,

Post your code and table structure.

hi,

Try bellow code

select checktime from checkinout where checktime like '#"&any_dt&"#'

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.