Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Time formatting
Fri, Nov 7 2008 10:41 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

I want to use LIST to get a list of times from a TIMESTAMP. I only want it to the minute. Anyone come up with anything better than

cast(cast(when as TIME)as varchar(5))

It works, I just want to know if there's anything better.

Roy Lambert
Fri, Nov 7 2008 10:44 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< I want to use LIST to get a list of times from a TIMESTAMP. I only want
it to the minute. Anyone come up with anything better than

cast(cast(when as TIME)as varchar(5))

It works, I just want to know if there's anything better. >>

I would use this:

cast(extract(hour from when) AS varchar(2)) + ':' + cast(extract(minute from
when) AS varchar(2))

--
Tim Young
Elevate Software
www.elevatesoft.com

Image