SELECT datediff(yy,'2010-06-1 10:10',GETDATE()) --计算多少年SELECT datediff(q,'2011-01-1 10:10',GETDATE()) --计算多少季度 3个月一个季度SELECT datediff(mm,'2011-06-1 10:10',GETDATE()) --计算多少月SELECT datediff(dd,'2011-06-1 10:10',GETDATE()) --计算多少天SELECT datediff(wk,'2011-06-1 10:10& Read More