Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I get only the date or time value using SQL comma
Message
 
To
25/05/2006 23:21:30
Teddy Win
Bytel Information Technology
Jakarta, Indonesia
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01125143
Message ID:
01125220
Views:
18
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform