<?xml version="1.0"?>
<!--
@author Last Changed:$Author: theegarten $
@version $Revision: 4772 $
@date $Date: 2010-09-06 15:04:22 +0200 (Mo, 06. Sep 2010) $
-->
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://schema.infor.com/InforOAGIS/2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ext="com.infor.tfs.mappings.extensions.XsltExt" xmlns:java="http://xml.apache.org/saxon/java" xmlns:tfs="http://www.infor.com/tfs" exclude-result-prefixes="java tfs">
	<!---->
	<!--****************************************************************************************************-->
	<!-- Retrieves the Time from a BOD Time/Date field -->
	<!--****************************************************************************************************-->
	<xsl:function name="tfs:getBODTime">
		<xsl:param name="dateTime"/>
		<!---->
		<xsl:choose>
			<xsl:when test="substring($dateTime, 12, 8)=''">
				<xsl:value-of select="'0000'"></xsl:value-of>			
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="ext:parseDate(substring($dateTime, 12, 8),'hh:mm:ss','HHmm')"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:function>
	
	<xsl:function name="tfs:getBODTime">
		<xsl:param name="dateTime"/>
		<xsl:param name="timeFormat"/>
		<!---->
		<xsl:choose>
			<xsl:when test="substring($dateTime, 12, 8)=''">
				<xsl:value-of select="'0000'"/>			
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="ext:parseDate(substring($dateTime, 12, 8),'hh:mm:ss',$timeFormat)"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:function>
</xsl:stylesheet>
