Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Last day of the week
Message
De
28/07/2004 16:18:57
Sony Joseph
Dovenmuehle Mortgage Inc
Schaumburg, Illinois, États-Unis
 
 
À
28/07/2004 16:15:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00928869
Message ID:
00928889
Vues:
26
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!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform