| | |
calendar control
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Dec 2002
Posts: 461
Reputation:
Solved Threads: 56
Actually there are 61 days between those two dates.
This is mm/dd/yy. If dd/mm/yy then date difference is 2 days.
Don't know about the calender control.
VB.NET Syntax (Toggle Plain Text)
Dim date1 As Date = #10/10/2006# Dim date2 As Date = #12/10/2006# Dim ts As TimeSpan = date2.Subtract(date1) Label1.Text = ts.TotalDays.ToString
This is mm/dd/yy. If dd/mm/yy then date difference is 2 days.
Don't know about the calender control.
Last edited by waynespangler; Oct 12th, 2006 at 12:38 pm.
•
•
•
•
Actually there are 61 days between those two dates.
VB.NET Syntax (Toggle Plain Text)
Dim date1 As Date = #10/10/2006# Dim date2 As Date = #12/10/2006# Dim ts As TimeSpan = date2.Subtract(date1) Label1.Text = ts.TotalDays.ToString
This is mm/dd/yy. If dd/mm/yy then date difference is 2 days.
Don't know about the calender control.
in dd/mm/yy format, there is technically "1" day between those two dates. Monday Oct 16 2006 to Wednesday Oct 18 2006, the day of Tuesday Oct 15 2006 would be the "1" day "between" those two dates.
Just all depends on what the original meaning was
Not sure of the actual code, but would be something like
date2.subtract(date1)
Label1.Text = ts.TotalDays.ToString (-2) <hehe, like i said, thats probably not it but the concept is there>
The (-2) part (yes i know, not correct probably) would take away 2 from the resulting answer to account for the beginning date and ending date. Again, this is only if you wanted to find out the actual number of days BETWEEN two dates (not counting those days)
![]() |
Similar Threads
- Retrieving dates from a dataset (Month Calendar) (VB.NET)
- Calendar control (ASP.NET)
- ActiveX Calendar Control Help =\ (VB.NET)
- Retrieving dates from a dataset (Month Calendar) (Community Introductions)
- I want to Edit Calendar Class in ASP.NET (ASP.NET)
- Edit Calendar (ASP.NET)
- Help with creating a Calendar!! (Visual Basic 4 / 5 / 6)
Other Threads in the VB.NET Forum
- Previous Thread: Adding the results of two text boxes (Visual Basic Express Edition)
- Next Thread: Help me pls
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
.net .net2008 2008 access advanced application array basic beginner browser button buttons center click client code combo convert cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic eclipse excel exists fade filter forms function html images input lib listview map mobile module monitor msaccess net number objects open panel pdf picturebox picturebox2 port position print printing problem read regex remove right-to-left save search serial settings shutdown socket sorting sqldatbase sqlserver survey temperature textbox timer timespan transparency txttoxmlconverter user usercontol validation vb vb.net vb2008 vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web webbrowser winforms winsock wpf wrapingcode xml year





