Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Last day of the week
Message
From
28/07/2004 16:18:57
Sony Joseph
Dovenmuehle Mortgage Inc
Schaumburg, Illinois, United States
 
 
To
28/07/2004 16:15:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00928869
Message ID:
00928889
Views:
28
Hi,

Sorry. As I guessed, there is no short functions. So I had to write this.

Function LastDowbyWeekNo(tnWeek, tnYear)
*-- Purpose : Get the last day of the week by a week number
Local ldTempDate

If Parameters() < 2
tnYear = Year(Date())
Endif

tnOffSet = tnWeek-2
ldTempDate = Date(tnYear,1,1)

Do While Week(ldTempDate) < tnWeek
ldTempDate = ldTempDate+1
Enddo
Do While Week(ldTempDate)=tnWeek
ldTempDate = ldTempDate+1
Enddo
Return ldTempDate-1
Solutions: when you want it, as you want it!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform