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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Datetime formatt with AM/PM.

Author  Topic 

hspatil31
Posting Yak Master

182 Posts

Posted - 2012-04-27 : 03:47:56
Dear All,

I want datetime formatt with 24 hours as follows,

"04/27/2012 04.15 AM"

"04/27/2012 15.20 PM"

Can anyone please help me how resolve this issue ?

Thanks and Regard's
Harish Patil

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-04-27 : 04:05:10
format it at your front end application


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2012-04-27 : 04:59:21
...or create a user defined function to do it for you. Front-end is better though.



- Lumbago
My blog-> http://thefirstsql.com/2011/07/08/how-to-find-gaps-in-identity-columns-at-the-speed-of-light/
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-04-27 : 15:27:51
if you've no other way but to do it in t-sql then look for CAST and CONVERT

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -