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 |
|
Kalaiselvan
Posting Yak Master
112 Posts |
Posted - 2011-03-11 : 01:30:26
|
| SELECT GETDATE() = 2011-03-11 11:59:29.703I need the above format as = 11/03/2011 11:59:29 AMPlease help me in finding this conversion.....Regards,Kalaiselvan RLove Yourself First.... |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
|
|
Kalaiselvan
Posting Yak Master
112 Posts |
Posted - 2011-03-11 : 02:55:47
|
| Not got my exact format from the link. I have already checked the link too. Reply me with right syntax. Upto now am using this syntax for this solution.Select Convert(varchar , Getdate(),103) + ' ' + Convert(varchar , Getdate(),108)+ ' ' + SUBSTRING(CONVERT(varchar(20), GETDATE(), 22), 18, 3)But i need the reply as simple way with simple conversion factor...Regards,Kalaiselvan RLove Yourself First.... |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-03-11 : 10:17:15
|
| Why does the formation matter in sql? If you want to show data in front end application, do formation thereMadhivananFailing to plan is Planning to fail |
 |
|
|
michael.appleton
Posting Yak Master
160 Posts |
Posted - 2011-03-11 : 10:38:32
|
| Almost every week this kind of question seems to be asked. The correct answer as madhivanan said is it should be done in the application. Store date and time data as datetime and forget about doing anything in the database concerning format conversions! |
 |
|
|
|
|
|