dotnetspider.com
Login Login    Register      

TutorialsForumCareer DevelopmentResourcesReviewsJobsInterviewCommunitiesProjectsTraining

Subscribe to Subscribers
Talk to Webmaster
Tony John

Facebook
Google+
Twitter
LinkedIn
Online Memberss
baskar
Sriram
Farzin Janta
Dharmaraj Nagarajan
Sisir
More...
Join our online Google+ community for Bloggers, Content Writers and Webmasters




Forums » .NET » .NET »

How can i get this?


Posted Date: 09 Dec 2009      Posted By:: Nepolian     Member Level: Silver    Member Rank: 1224     Points: 1   Responses: 5



i am developing windows application in vb.net 2005

i want to get current year in textbox like 2009

how can i get this?




Responses

#451680    Author: Asheej T K        Member Level: Diamond      Member Rank: 2     Date: 09/Dec/2009   Rating: 2 out of 52 out of 5     Points: 2

try this

TextBox1.Text = Year(Now).ToString()



Regards,
Asheej T K
Microsoft MVP[ASP.NET/IIS]
DotNetSpider MVM

Dotnet Galaxy



 
#451685    Author: Mohan      Member Level: Gold      Member Rank: 101     Date: 09/Dec/2009   Rating: 2 out of 52 out of 5     Points: 2

try this

Textbox1.Text=Now.Year.ToString()

Regards

Mohan Kumar.D



 
#451776    Author: Nilesh Prabhakarrao Jadhav      Member Level: Gold      Member Rank: 119     Date: 09/Dec/2009   Rating: 2 out of 52 out of 5     Points: 2

Hi Friend,

Use below link
http://www.dotnetspider.com/resources/35162-DATE-OPERATIONS.aspx

you will get all the date related functions.

Regards

Nilesh

Thanks & Regards

Nilkumar






 
#451811    Author: Thillai NathaN      Member Level: Silver      Member Rank: 0     Date: 09/Dec/2009   Rating: 2 out of 52 out of 5     Points: 2

Hi,

TextBox1.Text = Year(Now).ToString()

From,
M.Thillai.



 
#456213    Author: Anand Swami      Member Level: Gold      Member Rank: 695     Date: 21/Dec/2009   Rating: 2 out of 52 out of 5     Points: 2

Hi,

//********Get Current DATE and MONTH
DateTime Date = DateTime.Now;
string CurrentDate = Date.ToString("MM-dd-yyyy");
CurrentDate = CurrentDate.Replace("-", "");
string CurrentMonth = String.Format("{0:MMMM}", DateTime.Now).ToString();
string CurrentYear = DateTime.Now.Year.ToString();

--
Thanks & Regards,
Anand



 
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 : Difference
Previous : Microsoft Office Interop problem
Return to Discussion Forum
Post New Message
Category:

Related Messages



Follow us on Twitter: https://twitter.com/dotnetspider

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Email subscription
  • .NET Jobs
  • .NET Articles
  • .NET Forums
  • Articles Rss Feeds
    Forum Rss Feeds


    About Us    Contact Us    Copyright    Privacy Policy    Terms Of Use    Revenue Sharing sites   Advertise   Talk to Tony John
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
    2005 - 2012 All Rights Reserved.
    .NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
    Articles, tutorials and all other content offered here is for educational purpose only.
    We are not associated with Microsoft or its partners.