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 |
|
anaji
Starting Member
15 Posts |
Posted - 2012-06-10 : 07:53:38
|
| Gurus,i have this query |
|
|
anaji
Starting Member
15 Posts |
Posted - 2012-06-10 : 07:54:59
|
| sorry here is what i meanCONVERT(varchar(20),[START_DATETIME],101) AS DATE_TIMEthis converts to varchar , i want to convert it again to date afterit converts to varchar how can i do that?thanks, |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-06-10 : 15:24:54
|
| why do you need to do it in sqkl? if its for a presentation why not do this at front end using formatting functions?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
anaji
Starting Member
15 Posts |
Posted - 2012-06-11 : 01:26:38
|
| well after i query the values are passed to another DB that uses another application that we have, so it is set as date in the other DB, and if i try to change it over there it tells me you can't change the format you have to do it in the source data, that''s why i want to change it as date and then pass it to the other DB |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2012-06-11 : 03:18:01
|
It seems to me you want to trim the time part.SELECT CAST(START_DATETIME AS DATE)will do. N 56°04'39.26"E 12°55'05.63" |
 |
|
|
|
|
|