Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there a shorter syntax?
Message
 
À
23/05/2001 23:51:35
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00510693
Message ID:
00510722
Vues:
14
>>It doesn't work because I have to CAST to be able to concatenate the / (and the cast erase the 0).
>
>
>OK... let's try again. This works for me:
>
>
>SELECT convert(char(7),convert(datetime,TB.Date),111)
>...
>
>
>It returns yyyy/mm (i.e. '2001/05')
>Hope it works for you.

Great. Thanks.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform