xsl-list
[Top] [All Lists]

[xsl] DateTime Conversion question

2010-10-06 17:50:30


I'm trying to convert a (UK) date format into a SQL DateTime so I can 
ingest the resultant transform into SQL2008 with SSIS

The (simplified) source XML is:
<Log>
<outputCommand Command="sendData" Time="06/10/2010 22:22:01">
</outputCommand>
</Log>

I can get as far as  transforming thus:

.....
<xsl:template match=:"outputCommand">
<outputCommand>
<Command>xsl:value-of select="@Command"></Command>
<Time>xsl:value-of select="@Time"></Time
</outputCommand>
</xsl:template>

But I admit defeat in trying to convert the time value to a SQL 
datetime (i.e. 20101006T22:22:01)

I'm happy to use XSLT 1.0 or 2.0, however, everything I've read 
today says that .NET2008 only supports XSLT 1.0, as I'm using 
System.Xml.Xsl.XslCompiledTransform to 'do' the transformation

Any help or a link appreciated

Neil

                                          
--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>