[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: limits of the generic
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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|