Hi Pete,
I'm assuming you get 11-10-20 instead of 11-10-2006 because you've set the textbox to only be 8 characters. You're going to have to parse it out yourself I think. Simple code (I'd create a method to handle this):
DateTime now = DateTime.Now;
string day = now.Day.ToString();
string month = now.Month.ToString();
string year = now.Year.ToString();
year = year.Substring(2);
mytextbox.Text = day + "-" + month + "-" + year;
Will that work for you?
~~Bonnie
>Hello All, I would like to be able to show dates in the format: dd-mm-yy without setting the Windows shortdate to dd-mm-yy ( I'm using a masked textbox for input ), however, if I populate the Text property using
>
>mytextbox.Text = DateTime.Now.ToShortDateString();
>
>I get 11-10-20, I don't know the implications of changing the Windows shortdate setting so would like to work around it for now, many thanks.