Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there a shorter syntax?
Message
 
À
23/05/2001 22:31:07
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00510693
Message ID:
00510698
Vues:
18
>Hey, whatever works... But, you may want to look at datepart and convert...
>
>SELECT left(convert(datetime,TB.Date,111),7) as Date, ...
>WHERE ...
>GROUP BY datepart(yyyy, TB.date), datepart(mm, TB.date)
>
>>
>>I want the output to be yyyy/mm.


The result is displaying "Apr 2 " and I want 2001/04
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform