Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How many weeks in a month
Message
 
 
To
05/11/2007 16:58:41
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01266837
Message ID:
01266914
Views:
11
Try (not tested much)
lnMonth = 10
lnYear = 2007
ldFirstOfMonth = DATE(lnYear, lnMonth, 1)
lnWeeksPerMonth = MOD(WEEK(GOMONTH(ldFirstOfMonth,1))+52 - WEEK(ldFirstOfMonth), 52)
? lnWeeksPerMonth	
>
>How I detect how many weeks in a month . Need to evaluate if a month got 5 weeks.
>
>I use this function, but It not evaluate quite well:
> (INT((DAY(DATE()))/7) +1 )
>
>It consider that all months got five weeks.
>
>
>Thanks in advance
>Carlos Burgis
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform