Dim dtStart As Date = txtHStart_Date.Text
Dim dtEnd As Date = txtHEnd_Date.Text
Dim ts As TimeSpan = dtEnd - dtStart
Console.WriteLine(ts.TotalDays = lblHNoDays.Text)
When trying to write to a label I get this message:
Conversion from string “Label” to type ‘Double’ is not valid.
How can I fix this?
It’s unclear to me what the last line means. Asigning a
stringto adoubleinside aConsole.WriteLinecall seems to make no sense to me.What I can imagine is that you want to write something like that: