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 |
|
lols
Posting Yak Master
174 Posts |
Posted - 2009-05-12 : 05:40:14
|
| How to display date as single value05/12/2009 15:05:56 should be displayed as 05122009150556 |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-05-12 : 05:44:46
|
| select replace(replace(replace('05/12/2009 15:05:56','/',''),' ',''),':','') |
 |
|
|
TheOne
Starting Member
6 Posts |
Posted - 2009-05-12 : 05:45:48
|
| select replace(replace(replace('05/12/2009 15:05:56','/',''),' ',''),':','') |
 |
|
|
lols
Posting Yak Master
174 Posts |
Posted - 2009-05-12 : 05:48:05
|
| Is there any other way of doing it rather than using so many Replace? |
 |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
|
|
lols
Posting Yak Master
174 Posts |
Posted - 2009-05-12 : 06:09:25
|
| and with time '108'...thanks |
 |
|
|
TheOne
Starting Member
6 Posts |
Posted - 2009-05-12 : 06:12:46
|
| select replace(replace(convert(varchar,getdate(),101)+convert(varchar,getdate(),108),'/',''),':','') |
 |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-05-12 : 06:17:47
|
quote: Originally posted by lols and with time '108'...thanks
welcome |
 |
|
|
|
|
|
|
|