[2005 Exp] DataSet.WriteXML - Date Format
Hi Guys,
I have a DataSet(Table) that amongst other things has a 'date' field.
I currently have an 'Export to XML' feature that writes the data out using DataSet.WriteXML(somwhere),
and I have a corresponding XSL file that formats the data for the Browser.
All is good, except the 'Date' data is displayed in the following format: 2005-04-07T00:00:00+10:00.
I would like the format to be like: 2005-04-07 (or better yet, 07 Apr 2005).
I am aware the I may be able to use XSLT file and use some inbuilt functions, however, those posts I found are circa 2003.
I was wondering if there is a better (.Net 2005) way. :)
Cheers 'n' Beers.
Re: [2005 Exp] DataSet.WriteXML - Date Format
This is not exactly a response to you query but rather a point of view. The current format is actually what XML date format is supposed to be so is more portable.
Re: [2005 Exp] DataSet.WriteXML - Date Format
I concur, however I need a way to ultimatly format the data for display.
At this stage I think I have at least three options:
1. Use an XSLT file (opposed to and XSL file - which I currently have).
2. Write out, read back in and modify, then write back out.
3. Code in the HTML tags whilst iterating the DataSet table using StraemWriter (formating the Date fields).
:)
Re: [2005 Exp] DataSet.WriteXML - Date Format
XSLT is the go :)
Helps when you have an editor too..........