Hi,
Try this:
select DATEDIFF(DD,[pay_date],(select [pay_date] from [Peyment] where [pay_cus_id]=3)) as datediff1 from [Peyment] where [pay_sm_id]=2
The above query will return Diff of DD, in order to get YY and MM, you need to change DD as DATEDIFF requires 3 parameters.
I hope it helps,
Cheers