SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Datetime formatt with AM/PM.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

hspatil31
Posting Yak Master

175 Posts

Posted - 04/27/2012 :  03:47:56  Show Profile  Reply with Quote
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)

Singapore
16746 Posts

Posted - 04/27/2012 :  04:05:10  Show Profile  Reply with Quote
format it at your front end application


KH
Time is always against us

Go to Top of Page

Lumbago
Norsk Yak Master

Norway
3241 Posts

Posted - 04/27/2012 :  04:59:21  Show Profile  Reply with Quote
...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

India
47157 Posts

Posted - 04/27/2012 :  15:27:51  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000