Problems with date math

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 12915
interpreted = N
texte = While playing around with date math to make a [SHOWIF] work, I came across a bit of a problem. The dates don't add correctly. It might be a bug, it might be something in my code. Either way, I can't figure out.Here's some examples off a test page (the code is on the left, the results are on the right):[DATE]: 8/7/97 [FORMAT Days_to_Date %m/%y][MATH]{[DATE]}-{02/00/0000}[/MATH][/FORMAT]: 7/97 [FORMAT Days_to_Date %m/%y][MATH]{[DATE]}-{01/00/0000}[/MATH][/FORMAT]: 8/97 [FORMAT Days_to_Date %m/%y][MATH]{[DATE]}+{01/00/0000}[/MATH][/FORMAT]: 8/97 [FORMAT Days_to_Date %m/%y][MATH]{[DATE]}+{02/00/0000}[/MATH][/FORMAT]: 9/97 [FORMAT Days_to_Date %m/%y][MATH]{[DATE]}+{03/00/0000}[/MATH][/FORMAT]: 10/97 [FORMAT Days_to_Date %m/%y][MATH]{[DATE]}+{04/00/0000}[/MATH][/FORMAT]: 11/97I'm running the Plug-In. Any ideas?MichaelMichael Winston *By Phone!: (503)/652/8815 x341 Internet Coordinator *By e-mail!: michaelw@dhorse.com Dark Horse Comics, Inc. *By web!: http://www.dhorse.com/ Associated Messages, from the most recent to the oldest:

    
  1. Problems with date math (Michael Winston 1997)
  2. Re: Problems with date math (Olin 1997)
  3. Re: Problems with date math (Grant Hulbert 1997)
While playing around with date math to make a [showif] work, I came across a bit of a problem. The dates don't add correctly. It might be a bug, it might be something in my code. Either way, I can't figure out.Here's some examples off a test page (the code is on the left, the results are on the right):[date]: 8/7/97 [FORMAT Days_to_Date %m/%y][math]{[date]}-{02/00/0000}[/MATH][/FORMAT]: 7/97 [FORMAT Days_to_Date %m/%y][math]{[date]}-{01/00/0000}[/MATH][/FORMAT]: 8/97 [FORMAT Days_to_Date %m/%y][math]{[date]}+{01/00/0000}[/MATH][/FORMAT]: 8/97 [FORMAT Days_to_Date %m/%y][math]{[date]}+{02/00/0000}[/MATH][/FORMAT]: 9/97 [FORMAT Days_to_Date %m/%y][math]{[date]}+{03/00/0000}[/MATH][/FORMAT]: 10/97 [FORMAT Days_to_Date %m/%y][math]{[date]}+{04/00/0000}[/MATH][/FORMAT]: 11/97I'm running the Plug-In. Any ideas?MichaelMichael Winston *By Phone!: (503)/652/8815 x341 Internet Coordinator *By e-mail!: michaelw@dhorse.com Dark Horse Comics, Inc. *By web!: http://www.dhorse.com/ Michael Winston

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Credit card processing - UK (1997) ShowNext (was New WebCatalog Site) (1997) [browsername] not working? (1997) Showif, Hideif reverse logic ? (1997) Re:Emailer tracking (1997) WebCat2 Append problem (B14Macacgi) (1997) search context w shownext works! (1997) Re:quit command on NT (1997) [format] (1998) [off] Promotions/ECRC (1997) 2.0 Beta (1997) listfiles, moving files (1998) Notepad problems (1998) Wanted: Broader string manipulation functions (1997) GuestBook example (1997) Size Limitation through a POST via SSL? (2005) WebCat2b13MacPlugIn - More limits on [include] (1997) Major Security Hole IIS NT (1998) splitting numbers in webDNA? (1997) Help Wanted - Stowe, Vermont (1999)