Click here to Skip to main content
15,894,720 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how check month or year is end or not for filling the attendance
Posted
Updated 5-Feb-12 22:32pm
v2
Comments
manognya kota 6-Feb-12 4:22am    
Question is not clear.Could you please explain ?
OriginalGriff 6-Feb-12 4:30am    
I'm sure English is not your native language, but it is the default language for this site.
In English, your question makes no sense at all.
Please, either try to find a better translation of your question to English, or find a site in your own native language, as they may be able to help you better than we can!
Use the "Improve question" widget to edit your question and provide better information.
Rajeev Jayaram 6-Feb-12 4:48am    
If you are looking to find out the lastDay of Month and Year look into my answer below. Update the question with more information, as this is what I could infer from your question at the moment.
bbirajdar 8-Feb-12 10:26am    
Even google will not be able to find the answer for your phrase..Learn some english...

1 solution

Try this,

int noOfDays = DateTime.DaysInMonth(year, month);

DateTime lastDayOfMonth = new DateTime(year, month, noOfDays);

DateTime lastDayOfYear = new DateTime(year, 12, 31);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900