Click here to Skip to main content
15,790,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a combo box with index like current date if i selected the particular item i have to get the date time on combo box at index value -1...
can u plz send me the code for requirment..
Updated 6-Mar-21 6:02am

Add datetime in combobox and show the selected the index as datetime
combo1.Items.Add(Now.Today.Tostring("dd/MM/yyyy hh:mm"));
combo1.Items.selectedIndex = combo1.Items.length -1;
Share this answer
combo1.Items.Add(DateTime.Now.ToString("dd/MM/yyyy hh:mm"));
Share this answer
Member 15261963 25-Jun-21 2:52am    
Combobox How to change in system running Date & time ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900