2
返される日付に期日を計算しようとしています。そして、もし日付が1日以内に期限を過ぎたら返す。罰金が科せられます。週末を除いて2つの日付を計算するVB net
これは計算に
Dim st As Integer = MetroDateTime1.Value.Date.Subtract(Label9.Text).Days
If (Label6.Text) > (MetroDateTime1.Value.Date) Then _
MessageBox.Show("Date return must not below to date borrowed", _
"Input Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
MetroDateTime1.Focus()
ElseIf (st > 0) Then
MetroTextBox7.Text = (st * 5).ToString()
Else
MetroTextBox7.Text = 0
End If
私のコードは「Metrotextbox7は罰金のためのテキストボックスです。しかし、週末を除いてどのように日付を計算するのですか?
http://stackoverflow.com/questions/22837943/get-number-of-days-between-two-dates-excluding-weekendsの重複 –