Dim ChangeDay As Integer
ChangeDay = DateDiff(DateInterval.Day, 지정한날짜, 현재)
=================================================
for 문을 통해 datagridview 내 값에서 계산
'날짜 계산 방식
For i = 0 To DataGridView1.RowCount - 1
DataGridView1.Rows(i).Cells(2).Value = DateDiff(DateInterval.Day, DataGridView1.Rows(i).Cells(0).Value, DataGridView1.Rows(i).Cells(1).Value)
'정지신청가능일 구하기(정지신청일에서 1년 1일 더한 값)
DataGridView1.Rows(i).Cells(3).Value = CDate(DataGridView1.Rows(i).Cells(0).Value).AddYears(+1).AddDays(+1)
Next
'VB.net' 카테고리의 다른 글
공백제거 방법들 (0) | 2018.03.16 |
---|---|
Sendkey 이용방법 (0) | 2018.03.16 |
Navigate 기능을 이용한 검색기능 만들기 (0) | 2018.03.16 |
Textbox 엔터키 (0) | 2018.03.16 |
Textbox에 숫자만입력 (0) | 2018.03.16 |