How to check if a date falls under a specific month

Hello,

could you give me an example to follow thanks :slight_smile:

if the variable is of datatype dateTime we can use the Month Property for this
grafik
checking against 6 means date is within June

in case of date is a date string we will convert it first e.g. with CDate, DateTime.Parse, DateTime.ParseExact

uh how do you achieve this? Iā€™m picturing an if statement but am not sure the proper code to check if it belongs to next month

so tell us the datails to the date, which datatype is it?

uh date isnt a variable its a new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).AddDays(counter)

thanks I got it :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.