Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old February 6th, 2009, 10:58 AM
Authorized User
 
Join Date: Jun 2008
Location: , , .
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
Reply With Quote
  #2 (permalink)  
Old February 6th, 2009, 11:07 AM
Friend of Wrox
Points: 6,438, Level: 34
Points: 6,438, Level: 34 Points: 6,438, Level: 34 Points: 6,438, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2007
Location: Germany
Posts: 1,196
Thanks: 0
Thanked 237 Times in 236 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
Reply With Quote
The Following User Says Thank You to Martin Honnen For This Useful Post:
georgemeng (February 6th, 2009)
  #3 (permalink)  
Old February 6th, 2009, 11:11 AM
mhkay's Avatar
Wrox Author
Points: 17,773, Level: 58
Points: 17,773, Level: 58 Points: 17,773, Level: 58 Points: 17,773, Level: 58
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,839
Thanks: 0
Thanked 267 Times in 262 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
Reply With Quote
The Following User Says Thank You to mhkay For This Useful Post:
georgemeng (February 6th, 2009)
  #4 (permalink)  
Old February 6th, 2009, 11:18 AM
Authorized User
 
Join Date: Jun 2008
Location: , , .
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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 06: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 05:43 PM



All times are GMT -4. The time now is 12:38 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.