How to concatenate data into sql server

Asked

Viewed 3,172 times

4

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

'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? thanks

  • Solved your problems?

  • Yes, so far I appreciate the help

1 answer

3


Would that be.

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)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.