create table #t (hms char(6) check (isdate(stuff(stuff(hms, 3, 0, ':'), 6, 0, ':')) = 1)) insert #t values('012956') insert #t values('112996') select * from #t