Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get Week number for date for month
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01219925
Message ID:
01237663
Vues:
23
Hi Kirk,

It can be simplified a little bit. See http://www.berezniker.com/display/SQL/Week+number+in+a+month

>
>Your right and this one you put together seems to do the trick. Thanks again for you time and knowledge.
>
>
>SELECT (DAY(@dt)
>+ (((8 -
>	(1 + ((7 - (DATEPART(dw, DATEADD (month, DATEDIFF (month, 0, @dt), 0))-1)) % 7)) -- First Sunday
>	))%7)
>-1)/7 + 1
>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform