C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




How to find current date


Posted Date: 18 Aug 2008    Resource Type: Code Snippets    Category: Date & Time

Posted By: amit chaudhary       Member Level: Silver
Rating:     Points: 3



This code sample explains how to find the current date. It uses DateTime.Now member to get the date. The ToShortDateString() is just a way to format the DateTime object to make it printable. In this example, we load the current date in a Label by setting the Text property


protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack == false)
{
Label1.Text = DateTime.Now.ToShortDateString();
}
}




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Print Current Date  .  Pageload  .  Get Current Date  .  Find Current Date  .  Datetime  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Get Seconds from Minutes
Previous Resource: Pop Up Calnder Using dll in asp.net
Return to Discussion Resource Index
Post New Resource
Category: Date & Time


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

masks masks masks

Contact Us    Privacy Policy    Terms Of Use