How to concatenate date in sql server

4

I have a field where the date and time is saved:

'2013-06-13 00:00:01' and '2013-06-13 11:59:59'

I want to make an appointment by passing the date and a fixed time:

CONVERT(VARCHAR(10), CAST(getdate()  AS DATETIME), 111) + '00:00:01' and
CONVERT(VARCHAR(10), CAST(getdate()  AS DATETIME), 111) + '11:59:59'

How could I concatenate this information? I thank you

    
asked by anonymous 04.10.2016 / 20:09

1 answer

3

That would be it.

SUADATA between CAST(CONVERT(VARCHAR(10), CAST(getdate()  AS DATE), 101) + ' 00:00:01' AS DATETIME) 
AND  CAST(CONVERT(VARCHAR(10), CAST(getdate()  AS DATE), 101) + ' 11:59:59'AS DATETIME)
    
04.10.2016 / 21:52