on 05-17-2007 9:01 AM
Hi,
In XSLT mapping If my source has a value A or U or I then in the target A must be set to I, I to u.
How to achive this.
Can you Please send me a sample code for diplaying date and time of the system.
to srinivas5780@gmail.com.I tried using current-datetime() but do not know how and where to insert this function to display the same.
Thanks,
Phani
For point 1
You can use If with else, equls & Constant function & acheive it.
For point 2.
Calendar cal = new GregorianCalendar();
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddhhmmss");
GregorianCalendar date = new GregorianCalendar();
String dateStr = formatter.format(date.getTime());
use above mentiond code in User defined function.
Regards
Sushil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Please use the sample code below to get Date and Time..
<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="/">
<DATTIME>
<xsl:value-of select="current-dateTime()"/>
</DATTIME>
<DATE>
<xsl:value-of select="current-date()"/>
</DATE>
<TIME>
<xsl:value-of select="current-time()"/>
</TIME>
</xsl:template>
</xsl:stylesheet>
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.