Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to get previous month from the current system date in combobox
Posted
Comments
OriginalGriff 28-Jul-14 11:55am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
That doesn't make a lot of sense as it is! What is in the combobox? Or what should be in the combobox?

Use the "Improve question" widget to edit your question and provide better information.
Maciej Los 28-Jul-14 17:33pm    
What have you done? Where are you stuck?

How about:

C#
System.DateTime n = System.DateTime.Now.AddMonths ( -1 ) ;
n = new System.DateTime ( n.Year , n.Month , 1 ) ;
 
Share this answer
 
All you need to do is to declare variable and set its value to the value of combobox. Then you need to use DataAdd[^] function.
Try! Do not forget to use Try... Catch... Finally... End Try[^] code block.
 
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