Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get current date and time in XSL 1

Status
Not open for further replies.

yuli1104

Programmer
Feb 20, 2002
60
CA
Hello:
Does anyone know if there is some way I can get the current date and time in XSL ?

Thanks

Yuli1104
 
I believe a couple of explanations/scripts are floating around this Forum. Try searching on "date".
 
Hi. Does anybody know how to do this (Get the current Date in XSLT) ?
I tried to search but can't seem to find the answer.

Please help.

I'ld appreciate it.
 
I'm trying to get the current date in XSL too and cannot find a valid thread. Anyone?

 
hi,

JavaScript and xslt functions are used to embed date and time in xsl. The code is given below

<xsl:template match=&quot;item&quot;>

<script language=&quot;JavaScript&quot;>

<![CDATA[
function dt(Elem)
{
Elem.innerHTML=Elem.innerHTML + Date();
}
]]>

</script>


<p onclick=&quot;dt(this)&quot;>


<xsl:apply-templates/>

</p>

</xsl:template>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top