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 |
|
Asteroid
Starting Member
13 Posts |
Posted - 2005-07-02 : 11:22:04
|
| Hi,I have date in char format which i have inported from a txt file.The format is like this 20050612 ----------> data type charYYYYMMDDand i want it to display it in date like format as 12-05-2005.Any help |
|
|
JBelthoff
Posting Yak Master
173 Posts |
Posted - 2005-07-02 : 12:48:04
|
Try convert(datetime, '20050612') JB |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-07-04 : 01:49:54
|
| Do this in your presentation layerMadhivananFailing to plan is Planning to fail |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-07-04 : 03:32:47
|
DECLARE @MyDate datetimeSET DATEFORMAT YMDSELECT @MyDate = '20050612'SELECT @MyDate = DATEADD(Month, -1, @MyDate) -- SELECT CONVERT(varchar(11), @MyDate, 105)Kristen |
 |
|
|
|
|
|