I am trying to make a textbox(totalage) that display the number of days since the date inputed in another textbox(datestarted)
notes: -totalage display Clic for current date when empty
-dateplanted is auto filled on clic by syteme (format dd/mm/yy)
here's my code:
Private Sub NumberofDaysSince()
Dim tsTimeSpan As TimeSpan
Dim tNumberOfDays As Integer
Dim strMsgText As String
tsTimeSpan = Now.Subtract(datestarted.Text)
tNumberOfDays = tsTimeSpan.Days
strMsgText = tNumberOfDays.ToString()
If datestarted.Text = "Clic for current date" Then
Else : totalage.Text = strMsgText
I'm sure my error is stupid since i can't find it :P. and i'm sure you've noticed that i'm really new to this
but i loooove it !!
Thank you verry much for you help !