Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: changing the date format in an xml file using transformations

From: "Neil Smith [MVP Digital Media]" <neil@------.--->
To: NULL
Date: 3/31/2009 11:50:00 PM
DPDawson's website is the best starting point I'm aware of for XSLT
http://www.dpawson.co.uk/xsl/sect1/sect1.html

It has a specific FAQ section on date formatting which will probably
help here : http://www.dpawson.co.uk/xsl/sect2/dates.html

Most 'date' processing in XSL1 (which is what everybody has) is
string/substring processing.

 XSL2 might have better support (as well as regex) but I've not used
it - some of the pros here will probably chime in with a bit of luck.

If you can arrange for your dates to be serial dates (in YYYYMMDD
format) then you have a good chance of ordering the results
numerically using xsl:sort - make sure not to use US formats with the
impossible-to-sort-easily MMDDYYYY as they're not sequential ;-)

HTH
Cheers - Neil


On Tue, 31 Mar 2009 12:56:13 -0400, "Jennifer Robertson"
<jennifer@g...> wrote:

>Hello,
>
>I am a newbie, but have been trying to read up as much as i can about 
>xml/xslt.
>
>I have an xml file generated by microsoft access where all the dates are in 
>datetime format.
>
>I would like to transform this xml file, such that all the dates are changed 
>from datetime to date format.
>
>The xml file is generated using VBA (Application.ExportXML), but there are 
>no options in this command for a transformation. Therefore, I have to use 
>the Application.TranformXML command in my VBA to transform this file. I know 
>I need to have an xslt file to do the transformation. I also have generated 
>the schema file for the xml file.
>
>How do I generate this xslt file?
>
>Jen 
>
------------------------------------------------
Digital Media MVP : 2004-2009
http://mvp.support.microsoft.com/mvpfaqs


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent