Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I get only the date or time value using SQL comma
Message
 
À
25/05/2006 23:21:30
Teddy Win
Bytel Information Technology
Jakarta, Indonésie
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01125143
Message ID:
01125220
Vues:
21
This will select the date part using italian date (dd-mm-yyyy)
  Select convert(nvarchar(10),DateField,105)
And this will extract the time
  Select convert(nvarchar(11),DateField,114)
For more info check cast and convert in BOL.

HTH,

Enmanuel

>Dear Expert,
>
>I am very new to SQL server, I have a datetime field, how do I get only the
>date or time value using SQL command? ..
>
>Pls help, TIA
>
>Regards
>Teddy
I'm a mixture of Albert Einstein and Arnold Schwarzenegger. The only trouble is that I got Einstein's body and Schwarzenegger's brain
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform