[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] dateTime conversion


Subject: Re: [xsl] dateTime conversion
From: "Christopher R. Maden" <crism@xxxxxxxxx>
Date: Mon, 04 Oct 2010 17:15:12 -0400

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/04/2010 04:50 PM, sudheshna iyer wrote:
> Folks, Thank you for the responses.
>
> But as per client xsd, it is string. But I have to get this value and
> send that to another system which accepts xs:datetime.
>
> That is why I want to convert "2010-10-03T18:15:20-0400" to
> "2001-12-17T09:30:47Z".
>
> I don't have much knowledge about the different date format
> conversion functions. So is this post..

<xsl:template match="*[.='2010-10-03T18:15:20-0400']">
  <xsl:value-of select="'2001-12-17T09:30:47Z'"/>
</xsl:template>

If you want something else, you *really* need to explain it better.  You
are asking to convert a date/time in October 2010, Eastern Daylight
Time, to a date/time in December 2001, UTC.  I know of no general
algorithm that will do that.

(Although your subsequent message, bRandom number,b does suggest another
possible solution to this problem.)

~Chris
- --
Chris Maden, text nerd  <URL: http://crism.maden.org/ >
bI like being free, and that makes me an idiot, I suppose.b
  b Stan Rogers, bThe Idiotb
GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyqQ9cACgkQGfhmdwB3wxkCnQCfZyassVX8gmS62wgIkVOtsl1p
eQ0AoLr15KSkypTdM+wjgtVsndfoOGIM
=CbTr
-----END PGP SIGNATURE-----


Current Thread
Keywords
xsd