Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding function to SQL Server
Message
De
24/02/1999 08:52:56
 
 
À
24/02/1999 08:02:39
Christian Bellavance
Université du Québec à Hull
Hull, Québec, Canada
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00189928
Message ID:
00190902
Vues:
14
I haven't seen a easy solution to the problem you running into to. I use DATEPART() to seperate the datetime into two components: year and days-in-year

SELECT * FROM table
WHERE DATEPART(yy, datetimecolumn) = DATEPART(yy, sarg)
AND DATEPATH(dy, datetimecolumn) = DATEPART(dy, sarg)

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform