OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   RE: [xml-dev] limits of the generic

[ Lists Home | Date Index | Thread Index ]

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

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


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS