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

RE: String formatting

Subject: RE: String formatting
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 2 Feb 2005 23:09:06 -0000
xsl string format
If the format is completely predictable,

concat(substring(.,1,20), substring(.,24))

- I may have counted wrong.

If less predictable, use the replace() function in 2.0 or some combination
of substring-after() and substring-before() in 1.0.

Alternatively, in 2.0, cast to an xs:dateTime, extract the components using
e.g. seconds-from-dateTime(), modify the seconds value, and reconstruct.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Bhaskar, Rajan [mailto:RBhaskar@xxxxxxx] 
> Sent: 02 February 2005 22:29
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE:  String formatting
> 
> sorry in this form
> yyyy-MM-DDThh:mm:ss.SSS-HH:mm          but want to translate to 
> yyyy-MM-DDThh:mm:ss-HH:mm       removing the SSS
> 
> 
> 
> -----Original Message-----
> From: Bhaskar, Rajan [mailto:RBhaskar@xxxxxxx]
> Sent: Wednesday, February 02, 2005 5:26 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  String formatting
> 
> 
> 
> Hi,
>  I have a string in the form=20
> yyyy-MM-DDThh:mm:ss.SSS-HH:mm  but want to translate to=20
> yyyy-MM-DDThh:mm:ss-HH:mm  removing the SSS.
> 
> How can i do that.
> 
> thanks,
> Rajan

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.