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 |
|
Trininole
Yak Posting Veteran
83 Posts |
Posted - 2011-08-29 : 09:16:02
|
| what is the syntax to add hyphens to a date in a query for example if the referral date is listed as "20110630" in the results, how can i change that format to "2011-06-30"?Roger DeFour |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-08-29 : 09:38:07
|
| Formation should be done in the front end applicationdeclare @dt char(8)set @dt='20110630'select convert(char(10),cast(@dt as datetime),120)MadhivananFailing to plan is Planning to fail |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-08-29 : 10:29:14
|
| why do want to do this in a query?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|