Subject: RE: String formatting
From: "Bhaskar, Rajan" <RBhaskar@xxxxxxx>
Date: Thu, 3 Feb 2005 09:34:16 -0500
|
It is.
I'm validating before transforming and I've decided to use the substring
Thanks,
-----Original Message-----
From: Michael Kay [mailto:mike@xxxxxxxxxxxx]
Sent: Wednesday, February 02, 2005 6:09 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: String formatting
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
|