Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a shorter syntax?
Message
 
To
23/05/2001 22:31:07
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00510693
Message ID:
00510698
Views:
17
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform