Right I'm sure this should be dead simple and I'm probably missing something but here goes.I have a table with 2 fields. t_start and t_end, both are datetime fields. My table has 1 row.create table [dbo].[weirdtime]( [t_start] [datetime] not null, [t_end] [datetime] not null) on [primary]insert into weirdtime (t_start, t_end) values ('1899-12-30 00:00:00', '1899-12-30 17:15:00')
So I have a query that selects everything in this table where t_start is not equal to 1899-12-30 00:00:00 AND t_end is not equal to 1899-12-30 23:59:59. Simple eh?select * from weirdtime where t_start <> '1899-12-30 00:00:00' and t_end <> '1899-12-30 23:59:59'
This returns 0 rows. I must be missing something simple here.I've triedselect * from weirdtime where (t_start <> convert(datetime, '1899-12-30 00:00:00', 102)) and (t_end <> convert(datetime, '1899-12-30 23:59:59', 102))
this doesn't work.Any ideas?Thanks