This topic is locked

Search for Date

3/16/2009 8:58:31 AM
PHPRunner General questions
rjks author

I am trying to search for a date field, with the searchsuggest and then the simple search.
In the Searchsuggest I become a result :
WHERE [BookingDate] like '%0%' ORDER BY 1
Result "2009-03-01 00:00:00"
When I hit the Search key the Result is no "Records found"
The SQL Sting for search suggest is
SELECT DISTINCT TOP 10 [BookingDate] FROM [PCA].[dbo].[fn_iPCA_SAL3_Detail] WHERE [BookingDate] like '%0%' ORDER BY 1
The SQL for the simple search is :
SELECT * FROM [PCA].[dbo].[fn_iPCA_SAL3_Detail where convert(varchar(50),[BookingDate]) like '%03%'
QUESTION:

How can I make sure that Date fields are converted correctly for searchsuggest and simple search?

Is it possible to use convert with a date format for the searchsuggest, for example convert(varchar(50),[BookingDate],112), and for the simple search the standard search as a date field?
In the Searchsuggest the Date isn´t converted but in the simple search it is and then only as a string without format.
Thanks in advance for your help.
Robert <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=11260&image=1&table=forumtopics' class='bbc_emoticon' alt=':(' />

rjks author 3/18/2009

Hallo Support no news on this??
Robert

Sergey Kornilov admin 3/18/2009

Robert,
to contact support team open a ticket at http://support.xlinesoft.com.