Error with Day Function

Hi all.

I have this code and it is correct.

Dim logDayName As String = WeekdayName(Weekday(LogDateTextBox.Text))
Dim logMonthName As String = MonthName(Month(LogDateTextBox.Text))

The following code is an error on the Day function.

 Dim logMonthDay As Integer = Day(LogDateTextBox.Text)

Please offer assistance. Thank you, Shane.