Blog Post

snippet designate a certain time of the day in getdate()

,

Snippet to designate a certain time of the day to evaluate in the current day. If you need to limit a result to the current date after a particular time, strip the time out of the date, and concatenate the current time together with it, and then convert back to datetime2.

select convert(datetime2(0),cast(cast(getdate() as date) as varchar(10)) + ' 09:00 ')

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating