473,779 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Formatting Date

I want to create a HTML page from an XML document using XSLT. The date
values in the XML document are in the ISO format. I want to have the web
page display something like "7/15/2004" for the date and in another case I
want "HH:MM" for time of day. Can anyone point me to some resources
explaining how to accomplish this?

Thanks

Wayne
Nov 12 '05 #1
3 1591


Wayne Wengert wrote:
I want to create a HTML page from an XML document using XSLT. The date
values in the XML document are in the ISO format. I want to have the web
page display something like "7/15/2004" for the date and in another case I
want "HH:MM" for time of day. Can anyone point me to some resources
explaining how to accomplish this?


Which XSLT processor are you using? MSXML provides extension functions
like format-date and format-time. I am not sure the .NET XSLT processor
supports those.
There are also attempts like
http://www.exslt.org/date/index.html
which might help to solve that.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Nov 12 '05 #2
Martin;

Thanks for the response. I'll see if I can find anything about those
functions in VSNET 2003. I looked at that link you suggested but it is a bit
obscure on just what you need to download, how to install it and how to use
it. Do you know of any examples for that?

Wayne

"Martin Honnen" <ma*******@yaho o.de> wrote in message
news:eB******** ******@TK2MSFTN GP10.phx.gbl...


Wayne Wengert wrote:
I want to create a HTML page from an XML document using XSLT. The date
values in the XML document are in the ISO format. I want to have the web
page display something like "7/15/2004" for the date and in another case I want "HH:MM" for time of day. Can anyone point me to some resources
explaining how to accomplish this?


Which XSLT processor are you using? MSXML provides extension functions
like format-date and format-time. I am not sure the .NET XSLT processor
supports those.
There are also attempts like
http://www.exslt.org/date/index.html
which might help to solve that.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Nov 12 '05 #3


Wayne Wengert wrote:

Thanks for the response. I'll see if I can find anything about those
functions in VSNET 2003. I looked at that link you suggested but it is a bit
obscure on just what you need to download, how to install it and how to use
it. Do you know of any examples for that?


If you use .NET, then maybe Oleg's nxslt
http://www.tkachenko.com/dotnet/nxslt.html
helps, it seems to have
http://www.tkachenko.com/dotnet/nxsl...exslt-funclist
date and time functions.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5935
by: Jouke Langhout | last post by:
Hello all! For quite some time now, I've got the following problem: Access won't close properly when a user closes the application. An ACCESS process stays active and that process can only be terminated by pressing ++ and then terminate the process. I searched the entire internet and found out that there could be two things wrong (both of them are mentioned in the bug list on the access
2
1190
by: Sara | last post by:
The problem: Conditional formatting bold, red when field Value < date() sets the field background to white - always - whether condition is met or not. I want the field unfilled and just red/bold when the date has passed. Background: I have 2 related fields that are only rarely active, so I manage them in the query for the subform: ShowBlanket: IIf(,"Blanket","") and
4
2713
by: deko | last post by:
I've heard it's best not to have any formatting specified for Table fields (except perhaps Currency), and instead set the formatting in the Form or Report. But what about Yes/No fields? When I create a Yes/No field in a Table the default format is "Yes/No". If I clear or change the Format property in the General Tab (and keep the default "Checkbox" in the Lookup tab), the field still looks the same when I open the table in Datasheet...
4
3236
by: hope | last post by:
Hi, How can I format a string field using Data Formatting Expression property in datagrid? For example: format last name from BROWN to Brown. Thanks
4
2617
by: Nalaka | last post by:
Hi, I have two questions about gridViews. 1. How can I intercept the row/column values at loading to change values? 2. After I update a row (using default update functionality), how can I re-format the updated row fields. I have looked at gridView.rowUpdated method, but cannot figure out how....
2
1536
by: Thomas Beyerlein | last post by:
I am binding dates to a textbox, the date is stored in SQL in a datetime field. When it gets bound it turns it into a long date (Sunday, Dec. 25 2005), in SQL when viewing the table it views as a shortdate. When inserted to SQL the datetimepicker format for the date is short. I have not had a problem with the formatting of a date to a textbox before, but this time I am using the CurrencyManager to navigate though several records. This is...
2
2167
by: johndcal | last post by:
Hello All, I have a date value that I pull from a .csv file. After reading the file and storing the values in an array the value of the date could be found in $array, for example. ============================================================= while (($data = fgetcsv($handle,5000, ",")) !== FALSE) { $mydate = $data; // here is the array value that holds the date }
2
2272
by: David Veeneman | last post by:
How does one format a date column in a GridView control? I had assumed that the DataFormat string would do it, but MSDN only shows numeric formatting codes. Can dates be formatted using that property, or is it done some other way? Thanks in advance. -- David Veeneman Foresight Systems
4
8336
by: Ken Wigle | last post by:
All, I would be very grateful for any help on this question. I have an application in asp.net 2.0 where I dynamically create a datatable and then bind that to a gridview. Unfortunately, the date column always shows the date and time while I just want the short date. I have tried applying a format string {0:d} but to no avail. I saw a lot of posts regarding the htmlencode property but I do not know how to turn that off for a...
6
4607
by: Tomasz J | last post by:
Hello developers, I bind my TextBox control specyfying a format stored in my application global ApplicationContext object - it has a static string CurrencyFormat property. The problem - this works fine: Text='<%# Eval("Price", ApplicationContext.CurrencyFormat) %>'
0
9636
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9474
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10306
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9930
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2869
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.