I have started coding VB.net and am making a program.
I want this program to do something on a certain day (birthday)
I have Tried
If Date.Day(Now) = 1 And Month(Now) = 3 Then
Use the NET Framework DateTime structure and its properties instead
If DateTime.Now.Day = 13 And DateTime.Now.Month = 9 Then Console.WriteLine("Happy Birthday!") End If
As hinted below in the comments, you are mixing calls to the VB6 compatibility library (Month(Now) from Microsoft.VisualBasic.dll) and calls to DateTime structure (Date alias), but the DateTime structure doesn't have a shared member called Day, instead it has a shared property named Now and from this property you can extract the Day value.
If you insist in using the Microsoft.VisualBasic compatibility library then your code should be
If Day(Now) = 13 And Month(Now) = 9 Then .....