Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
What am I missing ? (messing with dates)
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 !
0 · ·