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
 Time Format

Author  Topic 

Sanjay_Bakshi
Starting Member

14 Posts

Posted - 2008-07-24 : 08:54:23
Dear All,
I have a time in this format 15:12 wanted to convert in 03:12 PM.
Please help


Sanjay

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-07-24 : 09:03:53
Formation should be done in front end application

select right(convert(varchar(20),dateadd(day,0,0)+'15:12',0),8)


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

VGuyz
Posting Yak Master

121 Posts

Posted - 2008-07-24 : 10:45:34
Check this

select right(convert(varchar(20),getdate(),100),8)
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-07-24 : 10:48:11
quote:
Originally posted by VGuyz

Check this

select right(convert(varchar(20),getdate(),100),8)


Did you understand the question properly?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -