Subject: RE: String formatting
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 2 Feb 2005 23:09:06 -0000
|
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
|