calendar control

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Apr 2006
Posts: 62
Reputation: Fenerbahce is an unknown quantity at this point 
Solved Threads: 0
Fenerbahce Fenerbahce is offline Offline
Junior Poster in Training

calendar control

 
0
  #1
Oct 10th, 2006
hi,

1-how can i do multiselect in calendar.
2-how many days between 2 dates? how can u calculate it?
example :
10/10/2006 - 12/10/2006 there is 1 day between those 2 dates.

thanks
Reply With Quote Quick reply to this message  
Join Date: Dec 2002
Posts: 461
Reputation: waynespangler is on a distinguished road 
Solved Threads: 56
waynespangler waynespangler is offline Offline
Posting Pro in Training

Re: calendar control

 
0
  #2
Oct 12th, 2006
Actually there are 61 days between those two dates.

  1. Dim date1 As Date = #10/10/2006#
  2. Dim date2 As Date = #12/10/2006#
  3. Dim ts As TimeSpan = date2.Subtract(date1)
  4. 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.
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 62
Reputation: Fenerbahce is an unknown quantity at this point 
Solved Threads: 0
Fenerbahce Fenerbahce is offline Offline
Junior Poster in Training

Re: calendar control

 
0
  #3
Oct 13th, 2006
hi,
thank you very much for your help
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 42
Reputation: ChadW is an unknown quantity at this point 
Solved Threads: 0
ChadW's Avatar
ChadW ChadW is offline Offline
Light Poster

Re: calendar control

 
0
  #4
Oct 16th, 2006
Originally Posted by waynespangler View Post
Actually there are 61 days between those two dates.

  1. Dim date1 As Date = #10/10/2006#
  2. Dim date2 As Date = #12/10/2006#
  3. Dim ts As TimeSpan = date2.Subtract(date1)
  4. 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.
Depends on what was meant by "how many days between two dates"
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)
Reply With Quote Quick reply to this message  
Join Date: Dec 2002
Posts: 461
Reputation: waynespangler is on a distinguished road 
Solved Threads: 56
waynespangler waynespangler is offline Offline
Posting Pro in Training

Re: calendar control

 
0
  #5
Oct 17th, 2006
Yea, same agrument I get from the wife. Next weekend is not the coming weekend but the one following. To me the next weekend is the one that is coming up.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 42
Reputation: ChadW is an unknown quantity at this point 
Solved Threads: 0
ChadW's Avatar
ChadW ChadW is offline Offline
Light Poster

Re: calendar control

 
0
  #6
Oct 17th, 2006
Originally Posted by waynespangler View Post
Yea, same agrument I get from the wife. Next weekend is not the coming weekend but the one following. To me the next weekend is the one that is coming up.
My daughter is the same way. WOMEN! :mrgreen:
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC