Previous | Next | Indexes
adultinternetusers > Tutorials > XSLT 2.0 Tutorial > Date and Time (3/7) >

Extracting hours, minutes, and seconds from time

XSLT

      <xsl:stylesheet
                  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  version="2.0">
            <xsl:output  method="xml"
                        indent="yes"
                        omit-xml-declaration="yes"/>

            <xsl:template  match="/aaa">
                  <xsl:variable  name="time"
                              select="current-time()"/>
                  <time>
                        <xsl:value-of  select="$time"/>
                  </time>
                  <hours>
                        <xsl:value-of  select="hours-from-time($time)"/>
                  </hours>
                  <minutes>
                        <xsl:value-of  select="minutes-from-time($time)"/>
                  </minutes>
                  <seconds>
                        <xsl:value-of  select="seconds-from-time($time)"/>
                  </seconds>
                  <timezone>
                        <xsl:value-of  select="timezone-from-time($time)"/>
                  </timezone>
            </xsl:template>

      </xsl:stylesheet>
XML

      <aaa/>
Output

      <time>14:13:30.716+01:00</time>
      <hours>14</hours>
      <minutes>13</minutes>
      <seconds>30.716</seconds>
      <timezone>PT1H</timezone>


Previous chapter: Recursions
Next chapter: Comments and processing instructions
Previous page: Extracting day, month, and year from date
Next page: Extracting all data from dateTime

Kevin Carr in Stanton

Natural Skin Care and European Soaps
TickTalk 5
city of stanton
internetusers


You can also get Organic Skin Care products from Bliss Bath Body and you must check out their Natural Body Lotions and bath soaps

Now if you are looking for the best deals on surf clothing from Quiksilver and Roxy then you have to check these amazing deals here:

Hey, check out this Organic Skin Care European Soaps along with Natural Lavender Body Lotion and shea butter

and we can get surf t shirts surfing shirt and And you must check out this website swim suit swimming suit and swim trunks