WOY Function for non-calendar weeks

John Esak john at valar.com
Tue Apr 6 00:19:16 PDT 2010


Joe,
I seem to rememer having to do something like this back at Nexus. The work
week was Sun-to-Sat so that wasn't the problem... It was that the first week
in the year started past the 1st day of the year so the number of weeks for
the whole year worked out wrong.  Or was it that ... Ahh hell, no matter
what I recollect about whatever esoteric date problem I had way back then,
I'm eventually going to come to that big BUG, I don't know what to do in
your case.  :-)  :-(     I mean obviosly, I would hope to mimic all the days
of the week and months of the year with dummy fields and then try to make a
set that represented those days + "1"... Do all the math with the regular
functions and if the source day fell in the + "1" group... It was a week
starting on Monday instead of Sunday... But I've just re-read what I was
trying to suggest and even I couldn't make sense of it and I just thought of
it 15 seconds ago.ddddddddddds   :-(   Hencxe so many :-('s  but at least
I'm commiserating with you...no one else is even doing that. :-)  :-(  

Watch, Ken will come up with somethijng aned it will have to do with
subtracting "7" instead of adding "1" and it will only be a 2 line
subroutine.... :-)

John
 

> -----Original Message-----
> From: filepro-list-bounces+john=valar.com at lists.celestial.com 
> [mailto:filepro-list-bounces+john=valar.com at lists.celestial.co
m] On Behalf Of Joe Chasan
> Sent: Monday, April 05, 2010 10:52 AM
> To: filePro Mailing List
> Subject: WOY Function for non-calendar weeks
> 
> I have a process at a site that's been working fine dividing up
> things based on WOY() function, which for most define a week as
> Sunday through Saturday.
> 
> Now they want to redefine their work week as Monday through Sunday.  
> WOY() takes no parameters but the subject date expression.  Does 
> anyone have a routing already written that *efficiently* (key word
> there) calculates WOY using other week start/end parameters?
> 
> --
> -Joe Chasan-                           Magnatech Business 
> Systems, Inc.
> joe - at - magnatechonline -dot- com   Hicksville, NY - USA
> http://www.MagnatechOnline.com         Tel.(516) 
> 931-4444/Fax.(516) 931-1264
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
> 



More information about the Filepro-list mailing list