Is there a function to return the actual week no for a given month?
Date in British format
i.e
01/01/200 to 07/01/2000 ---> return 1
08/01/200 to 14/01/2000 ---> return 2
I don't think this is exactly what your looking for. but it might help anyway.
x = {^1999-09-07}
? INT(DAY(x)/7)+1
Good Luck [sig]<p> Pete<br><a href=mailto:blindpete@mail.com>blindpete@mail.com</a><br><a href= > </a><br>What your mother told you is true! You will go blind! (from moonshine anyway)[/sig]
If you want the actual Week of the Month
[tt]
*/***************************************************************************
*/Program : function WOM (Week Of Month)
*/System :
*/Purpose : Return the week of the month the date is
*/Syntax : Week = wom(date())
*/Returns : integer - week - the number of the week the date is located in
*/Parameter : date - date - the date to be evaluated
*/Defaults : date = date()
*/Requires : nothing
*/Changes : nothing
*/Calls : nothing
*/Version : 1.0
*/Dated : 06/01/93
*/Written By: David W. Grewe
*/Assumption: A new week starts with a Monday
*/***************************************************************************
*& Date Function
*/***************************************************************************
*/ Record Of Change
*/
*/***************************************************************************
parameters pdDate
if parameters() < 1 .or. type("pdDate" # "D"
pdDate = date()
endif
lnStart = pdDate - day(pdDate)+1
lnWom = 1
do while lnStart <= pdDate
if dow(lnStart) = 2
lnWom = lnWom + 1
lnStart = lnStart + 7
else
lnStart = lnStart + (9 - dow(lnStart))
endif
enddo
return lnWom
[/tt]
[sig]<p>David W. Grewe<br><a href=mailtoave@internationalbid.net>Dave@internationalbid.net</a><br>[/sig]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.