[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Display dates in specific format

Subject: Re: Display dates in specific format
From: Mukul Gandhi <mukulgw3@xxxxxxxxx>
Date: Wed, 5 Nov 2003 00:02:12 -0800 (PST)
yahoo email date
Hi Puja,
You may do, something like --

<xsl:template match="/dataroot/GrantNet">
  <xsl:variable name="year" select="substring(c9, 1,
4)"/>
  <xsl:variable name="month" select="substring(c9, 9,
2)"/>
  <xsl:variable name="day" select="substring(c9, 6,
2)"/>
  <xsl:value-of select="concat($day, '/' , $month,
'/', $year)"/>
</xsl:template>

Regards,
Mukul

--- puja thakral <puja_thakral@xxxxxxxxx> wrote:
> Hi All,
> I've an xml document.
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <dataroot>
> 	<GrantNet>
> 		<c0>0005</c0>
> 		<c1>111</c1>
> 		<c2>GS</c2>
> 		<fldSponsorDesc>American Association
> </fldSponsorDesc>
> 		<Program>2000-2001 American Fellowships</Program>
> 		<URL>http://www.aauw.org/3000/fdnfelgra.html</URL>
> 		<Description></Description>
> 		<c9>1999-11-15T00:00:00</c9>
> 		<c13>Web</c13>
> 		<c14>1999-10-11T00:00:00</c14>
> 		<c15>False</c15>
> 		<c16>AH</c16>
> 		<fldCatDesc>Arts &amp; Humanities</fldCatDesc>
> 	</GrantNet>
> </dataroot>
> 
> I'm using stylesheet to display all the information
> in
> html format.
> But I don't know how to display date.I get the date
> displayed as 1999-11-15T00:00:00 although I want to
> display it as 11/15/1999.
> 
> Thanks for help in advance.
> Regards,
> Puja
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard
> http://antispam.yahoo.com/whatsnewfree
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> 


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.