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:

New Web Site Developers Database (1996) What am I missing (1997) Setting up shop (1997) RE:It just Does't add up!!! (1997) Re[2]: Next X hits (1996) random prob (2003) Email Newsletters (2003) 'page impression' techniques for banner ads (1999) Nested vs conditional (1997) International Orders (1998) cc auth with [purchase] (1998) emailer w/F2 (1997) Geographical Information Systems - GIS (2005) ups (1999) Date Formats (1997) SSL (1998) Grep issue (2003) Getting total number of items ordered (1997) OT- Move SQL DB's (2004) Not really WebCat (1997)