Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

How to compare Month '01/2013' to 2013-05-22 00:00:00.000

$
0
0
How to cast/convert these 2 time colums so that I can compare them?

Following statement causes error:

SELECT     DISTINCT Month
FROM         Calender
WHERE Month (SELECT DISTINCT CAST(modify_time AS date ) FROM Table2)

Month char(7) = 5/2013

Modify_Time datetime =  2013-05-22 00:00:00.000



Kenny_I


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>