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 |
|
dnf999
Constraint Violating Yak Guru
253 Posts |
Posted - 2008-06-09 : 06:36:37
|
| Hi I have fields with this dateformat:2002-10-09 10:03:00.000And I want to change to this:2002/10/09 10:03:00I've been looking at the help function, but can't seem to find this exact format. Any suggestions??Thanks! |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-09 : 06:54:43
|
| Use CONVERT() function. Look for syntax and usage in books online. Also if this is for display purpose alone try doing it in your front end applicationhttp://msdn.microsoft.com/en-us/library/ms187928.aspx |
 |
|
|
dass05555
Yak Posting Veteran
55 Posts |
Posted - 2008-06-09 : 06:55:25
|
| hi friend,check this ..,select CONVERT(VARCHAR(15),getdate(),111)+' '+ right(getdate(),8)cool..., |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-09 : 07:50:45
|
quote: Originally posted by dass05555 hi friend,check this ..,select CONVERT(VARCHAR(15),getdate(),111)+' '+ right(getdate(),8)cool...,
select REPLACE(CONVERT(varchar(19),GETDATE(),121),'-','/') |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-06-09 : 09:48:36
|
| Also if you want to show converted dates in front end application, do formation thereMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|
|
|