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.
| Author |
Topic |
|
smitha
Posting Yak Master
100 Posts |
Posted - 2009-12-02 : 05:35:25
|
| hi,I am using sql database and viewing the files using view.But the date column in the database is showing date and time both as I want only date.Of course the data type itself is datetime. Is there any solution I can view only date and no time.Please help me |
|
|
Sachin.Nand
2937 Posts |
Posted - 2009-12-02 : 05:44:28
|
| select CONVERT(varchar(30),getdate(),110)PBUH |
 |
|
|
kbhere
Yak Posting Veteran
58 Posts |
Posted - 2009-12-02 : 05:51:35
|
| SELECT LEFT(GETDATE(), 11)You can also try this..Balaji.K |
 |
|
|
smitha
Posting Yak Master
100 Posts |
Posted - 2009-12-02 : 06:07:30
|
| thanks I got that |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-12-02 : 08:00:40
|
quote: Originally posted by kbhere SELECT LEFT(GETDATE(), 11)You can also try this..Balaji.K
Dont reply on thisIt is based on the language settings of the serverMadhivananFailing to plan is Planning to fail |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-12-02 : 08:01:35
|
quote: Originally posted by smitha hi,I am using sql database and viewing the files using view.But the date column in the database is showing date and time both as I want only date.Of course the data type itself is datetime. Is there any solution I can view only date and no time.Please help me
Another method isselect dateadd(day,datediff(day,0,getdate()),0)MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|