Hi,
I have created
* 1 Datetimepicker (from date)
* 1 Comboxbox (How many days)
* 1 Textbox (Here it should display . Fromdate + How many days u select)
In the Combobox u select the from date in the combobox i have days 5,10,15,30 .
In the textbox i want to display the date.
So an example if i select 2014-02-22 in the DateTimePicker and in the Combox 5 Days i want it to display 2014-02-27 in the textbox.
Any Suggestions?
I solved it like this
DateTime dt = Convert.ToDateTime(dateTimePickerFron.Value.ToShortDateString());
dt = dt.AddDays(Convert.ToInt32(comboBoxdagar.SelectedItem));
textBoxEndDate.Text = dt.ToString(CultureInfo.InvariantCulture);
But right now it displays like this
03/17/2014 00:00:00
I want to remove the time and only display the date.
But i want to have the date like this displayed
2013-03-14