Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Hi All,I have two dates - '200501'(datein - comes from the database and is stored as a varchar) and '201202'( dateout -comes form the databse and is stored as a datetime) in the 'yymm'format. I need to get the datediff of months between them.Select datediff(month,'200501', '201202')does not work . I am using SQL Server 2008.Thanks in advance,Petronas