Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Split the date and time seperately

Author  Topic 

itnagaraj
Yak Posting Veteran

70 Posts

Posted - 2010-08-13 : 01:57:03
How to split the date and time seperately in SQL

Select '2010-08-13 08:35:36.873'

V.NAGARAJAN

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-08-13 : 02:10:32
You can use the CONVERT function with the appropriate style, however this is better handled inside your application and not in SQL. Let your application handle presentation issues, and let SQL handle returning raw data.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -