I want to display only the current year in a textbox. How can i achieve that. Please help me.
For Example i want to display 2017 in text i.e Current year.

You put the textbox on your form then some code like https://msdn.microsoft.com/en-us/library/system.datetime.year(v=vs.110).aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1

So after you get the current date and time.
`textbox.text = moment.Year;

If you find moment.Year returns an Int, then use some string conversion.

I have to ask, with all the docs available, why couldn't you find this?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.