Problem with Ages
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 41062
interpreted = N
texte = I'm using this code snippet to calculate ages of people in a db dynamically.[Format 10.0d][math](({[DATE %m/%d/%Y]}-{[DOB]})/365)[/math][/format]Someone pointed out this morning that a few ages are calculating wrong. Atfirst, I thought it was rounding up so, I checked the archives and foundthis code:[math]floor(({[date]}-{[DOB]})/365)[/math]I put this in the template and got the same result and now I'm reallyperplexed. It did the math and showed the person's already 37 when the DOBis not until July 1. The DOB record is 7/01/65 (without the quotes).Can anyone explain this to me (or show me what's wrong with the code)?_______________________________________________________________________Steve Dannaway | Director of Information Technology & General Counsel JM Associates | The Worldwide Leader in Outdoor Television_______________________________________________________________________-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
I'm using this code snippet to calculate ages of people in a db dynamically.[Format 10.0d][math](({[DATE %m/%d/%Y]}-{[DOB]})/365)[/math][/format]Someone pointed out this morning that a few ages are calculating wrong. Atfirst, I thought it was rounding up so, I checked the archives and foundthis code:[math]floor(({[date]}-{[DOB]})/365)[/math]I put this in the template and got the same result and now I'm reallyperplexed. It did the math and showed the person's already 37 when the DOBis not until July 1. The DOB record is 7/01/65 (without the quotes).Can anyone explain this to me (or show me what's wrong with the code)?_______________________________________________________________________Steve Dannaway | Director of Information Technology & General Counsel JM Associates | The Worldwide Leader in Outdoor Television_______________________________________________________________________-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Steve Dannaway
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:
still having shipCost.db Problem (1997)
WebCat .pdf file is still messed up... (2000)
RE: FileMaker and WebCat (1999)
Imagemagick, webdna, etc (2006)
[WebDNA] INCLUDE file= in the footer (2009)
Exists? (1997)
Security hole in WebCat? (1999)
Extra equals signs with IE? (More debugging questions...) (1997)
[GROUPS] followup (1997)
cart (1997)
Sticky .inc file! (2008)
MacAuthorize hub, no modal password dialog? (1997)
all records returned. (1997)
Preventing code execution (2003)
Frustration with formulas.db (1999)
How To get Some Help (2003)
acrobat -> wc (1998)
WebTV problems with WebCatalog?? (1998)
Is this possible in simple search? question? (1998)
FIXED: Showing Results Alphabetically in Columns (top tobottom) (2002)