select
DateDiff(Day, convert(datetime,'2/1/'+cast(Year(BeginDate) as varchar)),
convert(datetime,'2/29/'+cast(Year(BeginDate) as varchar)))
from [table]
where (begindate is not null and en
请设置下表。当我使用datediff(StartDate,SubmittedOn)时,我只能得到int类型的日子,这是不准确的。那么如何获得最后一个?谢谢。 StartDate SubmittedOn what I get using datediff what I am tring to get
9/7/2016 13:12 9/1/2016 0:00 6 6.5505208
我被困在一个地方。 我在微软的Access使用DateDiff的它给我正确的输出,就像 StartDate is 10-Sep-2016
EndDate is 15-Oct-2016
Total Days which I will get is 35
& months will i get is 1 Month
DateDiff('d',StartDate,EndDate)
**不