How to find difference between two dates in xslt 1.0?

Posted by ttarakarajesh-8732 under XML on 5/17/2011 | Points: 10 | Views : 16436 | Status : [Member] | Replies : 4
Hi All,

Can anybody plz tell me, how to find the difference between two dates in xslt 1.0?

e.g. I want to calculate the difference between 11/05/2005 11:20:52AM and 25/05/2010 12:50:50PM.

and I want that difference in hours format..

Thank you.




Responses

Posted by: A4u6178 on: 5/18/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

Xslt stands for eXtesible Stylesheet Language used for styling the Xml documents, and hence to transform xml document file to xhtml document.
it doesn't have any functions so to implement ur task i hope following url may help
http://javascript.internet.com/math-related/date-difference.html

Thanks & Regards;
aaa

ttarakarajesh-8732, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: ttarakarajesh-8732 on: 5/20/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

First of all Thaks for your response. I need to calculate the date difference only from xslt 1.0. Javascript code is not required to my application.
Could you please help me as early as possible.

Regards.,
Tarak

ttarakarajesh-8732, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: A4u6178 on: 5/21/2011 [Member] Starter | Points: 25

Up
0
Down
Hi Tarak,

Try this Link:http://www.exslt.org/date/functions/date/index.html

Thanks & Regards;
aaa

ttarakarajesh-8732, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: T.saravanan on: 5/21/2011 [Member] [MVP] Silver | Points: 25

Up
0
Down
Hi,

Refer the following links..I think its helpful to you..
http://stackoverflow.com/questions/1778647/to-deal-with-date-difference
http://social.msdn.microsoft.com/forums/en-US/xmlandnetfx/thread/84981ff0-fb31-47e6-8e40-727f0a05e0bc

Thanks,
T.Saravanan

ttarakarajesh-8732, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response