Forum General


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Compare date if it is before 15th of the current month

ukku2215ukku2215 Member ✭✭
edited December 2020 in General

I want to show policy start date but here are the scenarios:-
1. Show policy start date only if it is greater than current date.
2. Show policy start date as 1st of next month only if in current month.
3. Show policy start date if it is greater than 15th of the current month and policy start date should be 1st of next month.

if(policyStartDate > 15th of current month)
policyStartDate = 1st of coming next month;

this is how it should be.

I do get my policyStartDate from my service and it always starts from the 1st of the month.
What I want is to calculate whether my currentDate is greater than the 15th of the current month and if yes show my policyStartDate to the 1st of next coming month.


  • JohnHJohnH GBMember ✭✭✭✭✭
    This isn’t a Xamarin question, it’s a c# question.
    Take a look at creating a new date time class with the days and months you require.
Sign In or Register to comment.