我被困在一個地方。 我在微軟的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)
**不
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