I want to make a school fees collection system, but I am confused about dates. I want it like this:
Count the months From Admission date to now.
I want to make a school fees collection system, but I am confused about dates. I want it like this:
Count the months From Admission date to now.
I used the DateDiff function described here https://learn.microsoft.com/en-us/dotnet/api/microsoft.visualbasic.dateandtime.datediff?view=netcore-3.1
From the docs...
"The return value for DateInterval.Month is calculated purely from the year and month parts of the arguments."
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim Date1 = #10/2/2020#
Dim Date2 = #12/25/2024#
Dim DifInMonths = DateDiff(DateInterval.Month, Date1, Date2)
Debug.Print(DifInMonths.ToString)
End Sub