Solved

Formatting dates in XSL

Posted on 2012-04-11
2
294 Views
Last Modified: 2012-06-27
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?
0
Comment
Question by:sonic1234
2 Comments
 
LVL 6

Accepted Solution

by:
yawkey13 earned 500 total points
ID: 37835855
Here is a good date format function.  It's a few years old, but works.  

http://geekswithblogs.net/workdog/archive/2007/02/08/105858.aspx

There might be newer built in methods, but I haven't used XSL in a while.
0
 

Author Comment

by:sonic1234
ID: 37835867
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
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Get last 10 digits of an xsl value-of field 7 59
Path of Workbook 3 77
Optimum versions of Selenium Webdriver with Python On Windows 7 1 111
XSLT XML 4 19
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question