Its working.quote:Originally posted by bandiIf you do not have permissions to alter table structure... --Just check the following illustration:SET DATEFORMAT DMYGODECLARE @Gen varchar (7) = '10-2012', @Sg varchar(7) = '12-2012'SELECT cast(DATEDIFF(month,CAST ('01-'+@Gen AS DATE),CAST('01-'+@Sg AS DATE)) AS VARCHAR)as PPNOTE: Better to change data types of both columns to DATE type--Chandu