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
posted @ 2013-05-30 10:48 Merray Views(4112) Comments(0) Diggs(0) Edit