Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting Date
Message
From
13/06/2008 11:29:00
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Miscellaneous
Thread ID:
01323855
Message ID:
01323863
Views:
27
>>
>>	QUOTENAME (cast(DOB as varchar(254)),'"') AS DOB,
>>
>>
>>This is the result of running the SQL:
>>
>>"Nov 14 1965 12:00AM"
>>
>>
>>I need it like this:
>>
>>"19651114"
>>
>
>Take a look in CONVERT function in BOL
>
>DECLARE @test DateTime
>SET @TEst = GETDATE()
>
>SELECT CONVERT(varchar(8),@Test,112)
>
I tried this:
	QUOTENAME (CONVERT(varchar(8),DOB,112)),'"') AS DOB,
But got this error:
Msg 102, Level 15, State 1, Line 14
Incorrect syntax near ')'.
DOH! Extra parenthesis. Sorry!
Previous
Reply
Map
View

Click here to load this message in the networking platform