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.

Recommended Answers

All 4 Replies

Thank you rproffitt for your response.

The error is in the code. The 'Day' displays as an error.

When I run the app, I get this;

Error BC30107 'Day' is an Enum type and cannot be used as an expression.

The LogDateTextBox.Text date is (english format) - 23/11/2021

Probably the code is missing the following Imports:

Imports Microsoft.VisualBasic.DateAndTime
commented: Hi xrjf. That was the problem. Many thanks. +0

Hi xrjf. That was the problem. Many thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.