03-06-18, 03:18 PM
كود :
Dim Timespn As TimeSpan = Now - Me.DateTimePicker1.Value
Dim Year As Integer = (Timespn.TotalDays \ 365.25)
Dim Month As Integer = ((Timespn.TotalDays Mod 365.25) \ 30)
Dim Day As Integer = ((Timespn.TotalDays Mod 365.25) Mod 30)
MsgBox("Year : " & Year & ", Month : " & Month & ", Day : " & Day)