|
Yeah that sounds pretty straight forward, sometimes you
just need someone to knock some sense into you.
Thanks,
Brian
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
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
??
why not calculate the number of days and divide by
7?
Am I missing something?
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
|