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 |
peace
Constraint Violating Yak Guru
420 Posts |
Posted - 2013-05-03 : 02:50:29
|
select '"'+column1+'"|"'+column2+'"|"'+date+'"'from tablei would like to get the date output same as existing2013-11-03 14:00:00.000but i get this error:Conversion failed when converting date and/or time from character string.Then i tried thisselect '"'+column1+'"|"'+column2+'"|"'+convert(nvarchar,date)+'"'from tablebut i get the date format as below:"Nov 03 2013 14:00AM"how can i fix so that the date as existing? |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2013-05-03 : 02:55:53
|
select '"'+column1+'"|"'+column2+'"|"'+CONVERT(VARCHAR(23), @date, 121)+'"'from table--Chandu |
|
|
peace
Constraint Violating Yak Guru
420 Posts |
Posted - 2013-05-03 : 02:59:26
|
Got it thanks |
|
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2013-05-03 : 03:00:29
|
quote: Originally posted by peace Got it thanks
Welcome--Chandu |
|
|
|
|
|