Yeah that sounds pretty straight forward, sometimes you just need someone to knock some sense into you.
 
Thanks,
Brian


From: John McGowan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 03, 2005 9:57 AM
To: [email protected]
Subject: Re: Witango-Talk: weekdiff

Since you've defined your own algorithm for calculating the number of weeks between 2 dates, i suggest you just write up the routine... it's a pretty simple thing to do... sounds like all you really need to do is do the diff, come up with an number and conditionally add 0, 1 or 2 depending on which day of the week your start day and end day fall on.

/John

Tom Ferguson wrote:
ah, ok... I see.  Figured it had to be something


From: Brian Domine (bdomine) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 03, 2005 12:47 PM
To: [email protected]
Subject: RE: Witango-Talk: weekdiff

I guess because I need the number of weeks including partials, so for example if The first date was August 6 2005 and the second was August 28th 2005, @DATEDIFF would return 22. 22 divided by 7 is a little more than 3 and the actual weeks that date range touch would really be 5 so dividing by 7 doesnt give me what i need.
 
Thanks though,
Brian


From: Tom Ferguson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 03, 2005 9:40 AM
To: [email protected]
Subject: RE: Witango-Talk: weekdiff

??
 
why not calculate the number of days and divide by 7? 
 
Am I missing something?


From: Brian Domine (bdomine) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 03, 2005 12:33 PM
To: [email protected]
Subject: Witango-Talk: weekdiff

Is there anyway to calculate the number of weeks between 2 given dates, similar to how you get the number of days between two dates using @datediff?
 
I can do it by formating the two dates into a numerical week value and calculating the difference, but this won't work if its spanning years, any advice would be helpful. Thanks
 
Brian
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
      
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
    
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
    
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
  
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to