C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » .NET »

Where can I look what month is today ?


Posted Date: 27 Aug 2008      Posted By: Valeriu      Member Level: Bronze     Points: 1   Responses: 6



Hi,
so, where can I Look what month is today ? because for example I want to write if is not today Augost don;t open the next Windows Form ... understand me ?
Please, who can to help me ?

~Valercik





Responses

Author: Ritesh N. Jain    27 Aug 2008Member Level: GoldRating: 4 out of 54 out of 54 out of 54 out of 5     Points: 6

you can use Date.Now.Month to get current month.
hence as per your requirement it should be


if Date.Now.Month <>8 then
'Opne Form code.
End if



Author: Valeriu    27 Aug 2008Member Level: BronzeRating: 2 out of 52 out of 5     Points: 0

But in C# ?


Author: Ritesh N. Jain    27 Aug 2008Member Level: GoldRating: 4 out of 54 out of 54 out of 54 out of 5     Points: 6

it should be

if (System.DateTime.Now.Month != 8) {
//Opne Form code.
}



Author: Valeriu    27 Aug 2008Member Level: BronzeRating: 2 out of 52 out of 5     Points: 1

Ohh ..yeaahh ! .. thx my friends .. you are really a experts :) ...


Author: Ritesh N. Jain    27 Aug 2008Member Level: GoldRating: 4 out of 54 out of 54 out of 54 out of 5     Points: 6

not really but glad to know it worked for you ;)


Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : How to install AJAX?
Previous : How to use datetimepicker column in datagrid
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use