winforms - Valdiation From To date -


greetings

i developing windows form using vs2010 c#

i have 2 datetime pickers

1 fromdatepicker , other todatepicker

i want validate todate after date same day

eg if from:30/8/2010...to:16/8/2010

an error message showed user

thnx

you can comparisons on `datetimes'

if (todate < fromdate) {     messagebox.show("to date before date"); } 

if you're not worried time portion use date property:

if (todate.date < fromdate.date) {     messagebox.show("to date before date"); } 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -