[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: limits of the generic


xml dateadd
Dare Obasanjo asks:
> However I am have been curious about something; is
> there any programming environment that currently
> supports being able to add 4 years, 3 months, 2 days,
> 7 hours, 15 minutes and 12 seconds to September 28th,
> 2002 at 1:36:07PM ?

VB and VBScript Allow for it using the DateAdd function.

d = "9/28/2002 1:36:07 PM"
d = DateAdd("s", 12, DateAdd("n", 15, DateAdd("h", 7, DateAdd("d", 2,
DateAdd("m", 3, DateAdd("yyyy", 4, d))))))

SQL has a similar function named: DATEADD

And John Cowan wants to know:
> Ah, but what is 2004-02-29 plus a year and a day?

According to the previous language:
2005-03-01 (interestingly enough producing the same results regardless of
the order of operations)

Granted, your results might vary depending upon the order you perform the
addition.


Engineering is what happens when science and
mathematics meet politics.  Products are what
happens when all three meet reality.


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.