Home All Groups Group Topic Archive Search About

Time format hh:mm:ss pm

Author
21 Jan 2006 8:31 AM
SouRa
Hi,

I want time 'hh:mm:ss AM/PM' like this format.

Can u tell what are the ways to except substring using.

rgds,
Soura

Author
21 Jan 2006 8:50 AM
Jens
There is no Convert pattern for this format, so you need to use
SUBSTRING. Perhaps you are able to write a function which will put out
a well formatted string as you want it by inputting a datetime.

HTH, Jens Suessmeyer.
Author
22 Jan 2006 11:48 AM
Uri Dimant
SELECT REVERSE(LEFT(STUFF(REVERSE(
    CONVERT(varchar,getdate(),9)),3,4,SPACE(0)),11))





Show quote
"SouRa" <So***@discussions.microsoft.com> wrote in message
news:8C4E68EE-410D-4521-8D5B-4E650F5C9A10@microsoft.com...
> Hi,
>
> I want time 'hh:mm:ss AM/PM' like this format.
>
> Can u tell what are the ways to except substring using.
>
> rgds,
> Soura

AddThis Social Bookmark Button