Hi,
Why do I get '2007-03-01 00:00:00' for
select convert(smalldatetime,left(convert(varchar,getdate(),120),10) + ' 23:59:59')
same with
select convert(datetime,dateadd(ms ,-1,left(convert(varchar,(getdate() + 1),120),10) +' 00:00:00'))
or try this
create table test
(
aa smalldatetime
)
insert into test
values('2007-03-01 23:59:59')
select * from test = '2007-03-01 00:00:00' ??????
Why can i not create the precision i require!!!!