Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determine week in a month
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Determine week in a month
Miscellaneous
Thread ID:
01653700
Message ID:
01653700
Views:
66
Hi,

I am trying to create a function that will return the week number in a month, by any date of Monday.

For example, the date "08/21/2017" (in American system) it would be 3rd week (in August). The week has to have Monday. So this month (August) the first week is the week of August 7, August 14 is week 2, August 21 is week 3, and August 28 is week 4.

My code is very convoluted/complicated and I am sure there is a better way.

TIA
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Next
Reply
Map
View

Click here to load this message in the networking platform