C# Date Time Picker to Text?

Posted by user3691826 on Stack Overflow See other posts from Stack Overflow or by user3691826
Published on 2014-05-30T15:15:40Z Indexed on 2014/05/30 15:25 UTC
Read the original article Hit count: 160

Filed under:
|
|
|
|

Im trying to get a text from a file into date format for a label.

What i currently have works great for a DateTimePicker however im wanting to now use a label to display the date rather than a DateTimePicker.

This is what currently works when getting the value to a DateTimePicker:

        dateTimeMFR.Value = this.myKeyVault.MFRDate;

and this is what im attempting to make work in a label:

        DateTimePicker myDate = new DateTimePicker();
        myDate.Value = myKeyVault.MFRDate;
        txtMFR.Text = myDate.Text;

Thanks for any help on the matter.

© Stack Overflow or respective owner

Related posts about c#

Related posts about date