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
 24 Hrs Format

Author  Topic 

sanjay5219
Posting Yak Master

240 Posts

Posted - 2012-05-09 : 09:20:24
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
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-05-09 : 09:26:31
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
   

- Advertisement -