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 |
naveengopinathasari
Yak Posting Veteran
60 Posts |
Posted - 2011-07-22 : 03:13:28
|
I need to convert Time in 12 hrs and 24 hrs format.I have a column Datatype DATETIMEwhich will have date and Timei need to convert case 1 in 24hrs formatcase 2 in 12 hrs formatExample2010-12-21 01:14:43.4730000This has to be displayed in case 12010-12-21 01:14:43.4730000'case 2 2010-12-21 13:14:43.4730000'Lets unLearn |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-07-22 : 04:18:03
|
formatting of the date / time should be done at the front end application not in SQL Query. KH[spoiler]Time is always against us[/spoiler] |
|
|
elwoos
Master Smack Fu Yak Hacker
2052 Posts |
|
3magic
Starting Member
14 Posts |
Posted - 2011-08-10 : 01:13:47
|
SELECT convert(varchar, getdate(), 100) – mon dd yyyy hh:mmAM (or PM) – Oct 2 2008 11:01AM |
|
|
|
|
|