Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Converting Date
Message
 
À
13/06/2008 11:18:53
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:
01323857
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)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform