I am trying to calculate MONTH difference between one date column and today. Do we have any method in csharp like monthdiff or datediff to achieve this functionlaity? Issue with my code is if submission date year is different then it breaks.
bool isDateAccepted = ((SubmissionDate.Month - DateTime.Now.Month) < 6)
You could always add 6 months to the submission date, and compare it to the current date.
bool isDateAccepted = (submissionDate.AddMonths(6) > DateTime.Now);
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments