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
 24 Hrs Format
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sanjay5219
Posting Yak Master

178 Posts

Posted - 05/09/2012 :  09:20:24  Show Profile  Reply with Quote
Hi All,
I wanted to convert this value in 24 hrs format please suggest.
Table Name : t1
Column_Name : TT1

1900-01-01 01:20:00.000

sunitabeck
Flowing Fount of Yak Knowledge

5152 Posts

Posted - 05/09/2012 :  09:26:31  Show Profile  Reply with Quote
You can use the CONVERT function with the appropriate format. Format codes 114,120 and 121 converts to 24 hr clock. For example:
select CONVERT(VARCHAR(32),GETDATE(),120);
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.06 seconds. Powered By: Snitz Forums 2000