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 |
|
jafrywilson
Constraint Violating Yak Guru
379 Posts |
Posted - 2010-09-20 : 18:14:19
|
| how to select only date ? |
|
|
jafrywilson
Constraint Violating Yak Guru
379 Posts |
Posted - 2010-09-20 : 18:21:13
|
| Is there any possible in MS sql server2005 |
 |
|
|
jafrywilson
Constraint Violating Yak Guru
379 Posts |
Posted - 2010-09-20 : 18:23:33
|
| Please help me.. |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2010-09-20 : 18:32:30
|
| Hey..what version are you working with?in any caseGetDate() is a datetime function.Do you want to store data or display dataLook up CONVERT in Books online for the MANY options availale to youSELECT CONVERT(varchar(10),GetDate(),120)as an exampleBrett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx |
 |
|
|
jafrywilson
Constraint Violating Yak Guru
379 Posts |
Posted - 2010-09-20 : 18:35:15
|
| Thank you .. I got it.. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-09-21 : 11:36:48
|
| 1 Do Formation at front end application2 select dateadd(day,datediff(day,0,getdate()),0)MadhivananFailing to plan is Planning to fail |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-09-21 : 11:59:03
|
| if at all there's a way, do it at front end. changing the dates to varchar will cause problems especially when you've to do manipulations with these date values later.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
jcelko
Esteemed SQL Purist
547 Posts |
Posted - 2010-09-21 : 16:56:05
|
quote: Originally posted by jafrywilson how to select only date ?
SQL Server 2008 has some of the basic ANSI/ISO data types, so you can use them. Avoid the old proprietary CONVERT() or fancy proprietary temporal functions. CAST(some_datetime AS DATE)--CELKO--Books in Celko Series for Morgan-Kaufmann PublishingAnalytics and OLAP in SQLData and Databases: Concepts in Practice Data, Measurements and Standards in SQLSQL for SmartiesSQL Programming Style SQL Puzzles and Answers Thinking in SetsTrees and Hierarchies in SQL |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|