mbrc
mbrc

Reputation: 3953

XSL how to remove minutes from hours

I have for example time like 19:30 and now in XSLT I want to change it to 19:00.

The same for example from 19:45 to 19:00

How can I remove minutes in XSLT?

Upvotes: 1

Views: 52

Answers (1)

ABach
ABach

Reputation: 3738

<xsl:value-of select="concat(substring-before(timeField, ':'), ':00')"/>

...where <timeField> contains the value you are trying to modify.

Upvotes: 3

Related Questions