很简单你可以用: SELECT DATEADD(dd, DATEDIFF(dd, '2000-01-01 00:00:00' , GETDATE() ), '2000-01-01 00:00:00' ); 这样也可以: SELECT DATEADD( DAY ,DATEDIFF( DAY ,0,GETDATE()),0) 结果是: 2009-11-15 00:00:00.000(这是今天的日期) Author:Petter
很简单你可以用:
<span>SELECT</span> DATEADD(dd, DATEDIFF(dd, <span>'2000-01-01 00:00:00'</span>, GETDATE() ), <span>'2000-01-01 00:00:00'</span> );
这样也可以:
<span>SELECT</span> DATEADD(<span>DAY</span>,DATEDIFF(<span>DAY</span>,0,GETDATE()),0)
结果是:
2009-11-15 00:00:00.000(这是今天的日期)
Author:Petter Liu http://wintersun.cnblogs.com
希望对您有帮助!