Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

Prepopulate textbox with the current date

Im looking to prepopulate a textbox on form load with the mm-dd-yy format using Date textmode. Does anyone know the proper way of doing this ive been having issues getting this to work.
[Image: cIiTrNH.png]
string currentDate = DateTime.Now.ToString(“MM-dd-yy”);
textBox1.SetText(currentDate);
[Image: Syr3DlV.png]
(Mar 5, 2020 04:04 PM)gigajew Wrote:  string currentDate = DateTime.Now.ToString(“MM-dd-yy”);
textBox1.SetText(currentDate);

thanks for this works good
[Image: cIiTrNH.png]


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Java] by Nemo2478Jun 4, 2020 01:23 PM 3 195 Jun 4, 2020 01:23 PM
Last Post: Nemo2478
[.NET] by Formula 1Feb 28, 2019 02:31 PM 2 190 Feb 28, 2019 02:31 PM
Last Post: Formula 1
[.NET] by Moon RockJul 22, 2016 07:53 AM 2 218 Jul 22, 2016 07:53 AM
Last Post: Moon Rock