Home > Enterprise >  How can I check if the current date today is even or odd?
How can I check if the current date today is even or odd?

Time:07-05

I really dont know how and I couldnt find a question about it so here I am. I'm very much a beginner so excuse me if this is an obvious question

CodePudding user response:

You could use

var oddDate = (DateTime.Now.Day % 2) == 1;
  • Related