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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Convertion of 24hrs time to 12hrs time

Author  Topic 

sqldev6
Starting Member

18 Posts

Posted - 2008-05-14 : 09:52:45
Hi All,

I need to dispaly time part only from the date that in 12 hrs format.

Can any plz help me on this.

Thanks in advance

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-05-14 : 10:00:52
Its better to do this type of formatting at your front end. Most front end applications for formatting functions to perform such format conversions.
And if you really want to do it in SQL

SELECT RIGHT(CONVERT(varchar(30),yourdatecolumn,109),14)
Go to Top of Page
   

- Advertisement -