The value of TextBox1 is 10:24:23 AM and the value of TextBox2 is 11:32:54 AM.

Dim Tim1 As Date = TextBox1.Text
Dim Tim2 As Date = TextBox2.Text
Dim WD As Long = DateDiff(DateInterval.Hour, Tim1, Tim2)

But the error is;

'DateDiff' is a namespace, and so is not a valid expression

What's wrong with this?