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 |
|
Claire_Toronto
Starting Member
11 Posts |
Posted - 2011-08-10 : 18:16:20
|
| Hi there,I have a date stamp that looks like: 20110726 and I want it to be like: 2011-07-26 so I need the hyphens... but in some rows the date may be like 07262011 so I need that to change to: 2011-07-26 so it gets complicated... can anyone help please?thank you |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
Claire_Toronto
Starting Member
11 Posts |
Posted - 2011-08-10 : 18:39:51
|
| hi Tara,I tried this but it gives me the time:Code:convert(datetime, start_date, 120) as startdateResult:2011-08-02 00:00:00.000when I remove time I get an error: convert(date, start_date, 120) as startdateError:Type date is not a defined system type.can you help? thanks :) |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|