0
我想要得到的前一個月總天數如何獲得preivous月總數
代碼
Dim period as string
period = '01/2011'
totdays = DateDiff("d", txtPeriod, DateAdd("m", 1, txtPeriod))
「這會給本月totaldays ...
但我想要獲得前一個月的總天數
用戶只會輸入當前月份,但代碼應該驗證上個月
期望輸出
If period = '02/2011' means then it should display 31 days 'January
If period = '03/2011' means then it should display 28 days 'February
如何做到這一點...
任何幫助
@JP 02/2011只有28天,2012年僅29天.... – Gopal 2012-01-18 13:52:06
它仍然是1月,我一直忘了這是2012年,現在由於 – JimmyPena 2012-01-18 13:54:04