How to format time XSL 1.0

I'm trying to format this line to exclude the seconds at the end.

Any ideas?

<xsl:value-of select="TRANSACTION/PRINTTIME" />

I tried using format-time, then realized its not available in this version...
JonCardonaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jkmyoungCommented:
The answer is probably dependent on the format of the time itself.

One possibility which removes the last 2 characters
<xsl:value-of select="substring(TRANSACTION/PRINTTIME), 1, string-length(TRANSACTION/PRINTTIME) - 2)"/>

http://www.w3schools.com/xpath/xpath_functions.asp

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Gertone (Geert Bormans)Information ArchitectCommented:
Date formatting in XSLT is always a matter of substring operations
(unless you are using data-types in XSLT2.0)
functions to check are

substring(string, number, number)
substring-before(string, string)
substring-after(string, string)
string-length(string)

also handy are
translate() and normalize-space()

it is important for us to know how the date format is in order to help
There is a fair chance that jkmyoungs solution works
of course you need a -3 instead of -2 if the format has an 's' for seconds

if your format is something like this
12:24:13
it could be safer to have
substring-after(substring-after(TRANSACTION/PRINTTIME, ':') , ':')
because that also works with this
12:24:5 instead of 12:24:05

all depends on what you have,
but you are into heavy substringing :)

most XSLT programmers have over time built their own little date processing library,
or use one of the many available "out there"

one thing worth checking out is EXSLT,
that is a standardised XSLT extension, that has some extra functionality,
There is a date library, and you never know it is supported by your processor,
just check it out www.exslt.org

cheers
JonCardonaAuthor Commented:
jkmyoung,

This worked perfectly. Thanks!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
XML

From novice to tech pro — start learning today.