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
 General SQL Server Forums
 New to SQL Server Programming
 Datetime

Author  Topic 

Tamer
Starting Member

22 Posts

Posted - 2008-09-03 : 04:12:20
How can I identify a date colunm without showing the time in
SQL Server 2005.

Thanks In Advance
Tamer

sunil
Constraint Violating Yak Guru

282 Posts

Posted - 2008-09-03 : 04:38:17
If you trying to show only date portion from datetime column, then , its better you do in front end of your application. Its recommended.

In sql ,

SELECT CONVERT(VARCHAR(10),GETDATE(),111)
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-04 : 01:10:55
If you just want to clear off time part, then no need to convert to varchar. you can do like this

SELECT DATEADD(d,DATEDIFF(d,0,GETDATE()),0)
Go to Top of Page
   

- Advertisement -