Meyka Jograt Meyka Jograt - 1 year ago 85 Question

Set DateTimePicker to 12/31/[THIS YEAR]

I want to display in my DatetimePicker always the End of the year.

For example this year 12/31/2016.

Then if its 01/01/2017 today then the DateTimePicker will display 2017 End of the Year which its 12/31/2017.

How can I Set/Code this to DateTimePicker?

Answer Source

This will do it for the current year:

DateTimePicker1.Value = New DateTime(DateTime.Now.Year, 12, 31)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download