Dates in MSSQL are stored as: mon dd yyyy hh:miAM (or PM) and ODBC converts them to: yyyy-mm-dd hh:mi:ss.mmm(24h)
so: select * from Internetlog where convert(varchar, LogTime, 121) like '%2001-10-02%' -----Original Message----- From: Matthew DeChant [mailto:[EMAIL PROTECTED]] Sent: Monday, October 01, 2001 2:26 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Trouble retrieving DATETIME info from MSSQL Hello, I am having trouble getting data from a DATETIME field in MSSQL 7.0. The data in a general select query look like this: 2001-09-25 14:23:17.000 I can do this in MSSQL: select * from INTERNETLOG where Datetime like %2001% but not this: select * from INTERNETLOG where Datetime like %2001/09/25% or select * from INTERNETLOG where Datetime like %20010925% or select * from INTERNETLOG where Datetime like %2001/09% or select * from INTERNETLOG where Datetime like %14:23% -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]