how to query where date with time = date without time in ms sql

前端 未结 4 2101
臣服心动
臣服心动 2021-02-06 02:33

I want to do a query with dates this is my sample tsql:

select * from Bookings where StartTime = \'2/15/2014\'

the starttime has value \'2/15/2

4条回答
  •  忘掉有多难
    2021-02-06 02:43

    I believe you could also do this:

    select * from Bookings where StartTime::date = '2014-2-15'
    

提交回复
热议问题