Dim date1 As Date = DateTimePicker1.Value
Dim date2 As Date = DateTimePicker2.Value
Dim totalDays As Int32 = date1.DayOfYear – date2.DayOfYear
Dim totalWeeks As Int32 = date1.DayOfWeek – date2.DayOfWeek
Dim totalYears As Int32 = date1.Year – date2.Year
Dim totalMonths As Int32 = date1.Month – date2.Month
____________________________________________________________________
Semoga bermanfaat.
:)
Dim date2 As Date = DateTimePicker2.Value
Dim totalDays As Int32 = date1.DayOfYear – date2.DayOfYear
Dim totalWeeks As Int32 = date1.DayOfWeek – date2.DayOfWeek
Dim totalYears As Int32 = date1.Year – date2.Year
Dim totalMonths As Int32 = date1.Month – date2.Month
____________________________________________________________________
Semoga bermanfaat.
:)
Cara Menghitung Selisih Hari, Minggu, Bulan dan Tahun Menggunakan DateTimePicker
Reviewed by Syawaluddin Amin, S.Kom
on
Juni 14, 2013
Rating:
Tidak ada komentar: