[c#] Question about getting just the Month and Day

I searched and I found DateTime.Now Property (System) | Microsoft Learn and was able to get the “7/31/2014 2:36:15 PM” to display. What I want to do is just compare month and day. I don’t care about the year or time. How would I go about doing that?

So my goal is to have something happen on a particular Month/Day regardless of time and year.

Thanks for any help!

DateTime.Now.Month and DateTime.Now.Day.

3 Likes

Thanks. Much easier then expected. Think I might need to slow down next time and just type in DateTime.Now. and see what the menu suggests in MonoDev.

i tried to put in DateTime but no menu is popping up and it is highlighted in red

System.DateTime

or add using System; at the top of the script.

1 Like

Thank u very much…

1 Like