Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weeks in a year
Message
From
17/10/2006 11:23:27
 
 
To
17/10/2006 11:13:14
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01162585
Message ID:
01162588
Views:
16
>How I know how many weeks has the current year ? (any function o procedure?
>
>thanks in advance.
>
>Carlos Burgos

This will depend on how week no. 1 is defined, but this should work:
do while .t.
 lnMaxDay=31
 lnWeekMax=WEEK(DATE(YEAR(DATE()),12,lnMaxDay),0,0) && the two 0's may need to be changed!
 if lnWeekMax=1 && May report week 1 of the next year!
  lnMaxDay=lnMaxDay-1
 else
  exit
 endif
enddo
?lnWeekMax
Previous
Reply
Map
View

Click here to load this message in the networking platform