Convert date to DateTime in SQL and Query other than
I am having a problem with the simplest command in SQL Server Management. The problem seems to be related to the conversion process. The current column is only set to date, but I need to specify a range by date and time. Ultimately I would like to query where the date and time is greater than the previous datetime days.
Can anyone help me? I am pulling hair for the simplest query.
Select FROM [CustomerTracking].[dbo].[Submission] WHERE Date(CONVERT(Datetime, '0000-00-00 00:00:00', 102)) is BETWEEN '2012-03-14 12:23:00' AND 'Now' GO
source to share