大家好:select * from punc_oridata where personcode='C00612' and ptime>='2012-09-19 18:00:00.000'
and ptime<='2012-09-19 23:59:00.000'我想判斷ptime>=18點 and ptime<=23點59
請問這個要怎麼寫?謝謝.
and ptime<='2012-09-19 23:59:00.000'我想判斷ptime>=18點 and ptime<=23點59
請問這個要怎麼寫?謝謝.
select * from punc_oridata where personcode='C00612'
and convert(varchar(10),ptime,108) between '18:00:00' and '23:59:59';
and ptime<'2012-09-20 00:00:00'