Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Converting Date
Message
De
13/06/2008 11:29:00
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Divers
Thread ID:
01323855
Message ID:
01323863
Vues:
29
>>
>>	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!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform