Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 6th, 2009, 10:58 AM
Authorized User
 
Join Date: Jun 2008
Posts: 17
Thanks: 2
Thanked 0 Times in 0 Posts
Default Get day of week for 01 Jan 2009

Is there a way to call day-in-week to get value back for a string like: "01 Jan 2009"?

Thanks!
__________________
George Meng
 
Old February 6th, 2009, 11:07 AM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
Default

What is 'day-in-week'? A function you implemented?

If you are using XSLT 2.0 then check http://www.xsltfunctions.com/xsl/fun...y-of-week.html although you will need to convert your date format to yyyy-mm-dd first.
__________________
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog
The Following User Says Thank You to Martin Honnen For This Useful Post:
georgemeng (February 6th, 2009)
 
Old February 6th, 2009, 11:11 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

XSLT's date-handling functions always start with a date in international format, 2009-02-06. There are no functions to process dates in local-language (e.g. English) formats.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
The Following User Says Thank You to mhkay For This Useful Post:
georgemeng (February 6th, 2009)
 
Old February 6th, 2009, 11:18 AM
Authorized User
 
Join Date: Jun 2008
Posts: 17
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Sorry I did not make it clear.

I am using XSLT 1.0 EXSLT, and using data.day-in-week function.
I think I got the answer, I have to parse " Dec 2009" to "2009-12" first.

Thanks for your answer!
__________________
George Meng





Similar Threads
Thread Thread Starter Forum Replies Last Post
getting the same day of the week. crabjoe Classic ASP Basics 3 February 27th, 2008 12:45 PM
want to convert date from 01/12/07 to 12-Jan-2007 hurperl Perl 1 April 12th, 2007 05:47 AM
DAY of the week wdepreter Excel VBA 3 February 7th, 2007 06:44 AM
Day of week finder mrjaygreene Classic ASP Basics 6 May 13th, 2006 04:43 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.