mssql datetime

admin

Administrator
Staff member
I would like to search for dates in column with a datetime-type. I use this line;

$result= mssql_query("SELECT * FROM LOG WHERE $find LIKE '%" . $indata . "%' ORDER BY $sort",$con);

1. How do I search for 2001-05-14? It just returns results when I search for 2001. Another thing which may cause the problem is that it displays the results in 14th of May 2001 and so on. In the fields you find 2001-05-14 16:32:01 just like I inserted it. How do I display that without the original, "long" description?

Thanks / Henrik
 
Back
Top