Microsoft
Software
Hardware
Network
Question : I need my DateTimePicket to only allow dates for this year (vb.net)
I need something like this but this doesn't work obviously...
DepartureDateTimePicker.Mi
nDate() = ' 1/1 of the current year
I need this because I am Calculating the number of days in a range using the following logic due to the fact that I cannot figure out how to do it properly :^O
TravelDays = EndingDate.DayOfYear - BeginingDate.DayOfYear + 1
So if you can tell me the proper logic to determine the number of days in a range without using the dayofyear thing I will award the points to you. Or, if all you can do is get me the range that I'm looking for then you can have the points. I would rather get it proper so I don't have to worry about the whole first day of the year issue.
I'm creating a windows application for a school assignment using Visual Studio 2008 and VB.NET
Thanks in advance,
etan
Answer : I need my DateTimePicket to only allow dates for this year (vb.net)
Use the DateDiff function to calculate the number of days, like this:
TravelDays = DateDiff("d", BeginingDate, EndingDate )
jppinto
Random Solutions
Mixed tooltips using AddTool (GetDlgItem (IDC_THIS), IDC_THIS) and AddTool (this, LPSTR_TEXTCALLBACK) how to.
Cannot use remote executables after I upgraded to R2
method 'activeprinter' of object'_application' failed
Dropdowns in grid view 'edit item template' not working
How do you group PowerPoint Objects on a slide
Count files in folder
Web Browser Control (AxSHDocVw) & sendkeys.. won't work!
"Search Key was not found in any record" Excel or TXT import to MS Access2007
Set SQL Results to a Variable
DPM Hot Fix KB970868 does NOT resolve Issue 7