Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 319
  • Last Modified:

Formatting dates in XSL

I am currently transforming XML into an HTML table using XSL.

The XML file is a collection of 'Roads' - which I am rendering out to a table.

XML: http://sandbox5.project4.net/date/roads_locs.xml
XSL: http://sandbox5.project4.net/date/roads.xsl
HTML Output: http://sandbox5.project4.net/date/default.asp

You may note in the XSL that I have a couple of date properties for each <road> element, these are <observed> and <updated>

The format for these dates is <observed>mm/dd/yyyy h:m:s PM or PM</observed>

Question: What options are available using XSL to format these dates differently?
1 Solution
Here is a good date format function.  It's a few years old, but works.  


There might be newer built in methods, but I haven't used XSL in a while.
sonic1234Author Commented:
Thanks, looks like the smartest method might be to simply create a number of different formatted date items in the XML rather than trying to format it using XSL

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now