Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dates of first and last day of week
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01222747
Message ID:
01222749
Views:
14
Given what? A date, a week number?

Try this:

date() - dow(date()) + 1 && First day of week

Substitue any date value for DATE().

If given the week number, you could do something like so:

FirstDayOfYear + (WeekNum * 7) - dow(FirstDayOfYear + (WeekNum * 7)) + 1

This is rough, untested, and off the top of my head, but hopefully it will get you in the ballpark.


>Hi all.,
>Anybody has function/solution which returns date for first and last of any week in year ?
>TIA,
>Gojko
eCost.com continues to rip people off
Check their rating at ResellerRatings.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform