Click here to Skip to main content
15,441,629 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..
Posted
Updated 6-Mar-21 5:02am

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

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