Re: Storing dates (was: Re: Ticket Ordering Question)
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 54984
interpreted = N
texte = Joe,I have to agree with you... I am coding a date-related thing right now and I was wondering what was wrong with storing dates as [date] (MM/DD/YYY) like I've always done, which works fine for me as long as I specify &THE_DATE_FIELDtype=date in my search or whatever when I need to sort/display....Just my $0.02-Dan------------------------------------------------------------http://www.StrongGraphicDesign.comhttp://www.SearchBoise.com(208) 319-0137 | Toll-free p/f 877-561-1656------------------------------------------------------------On Mon, 15 Dec 2003 14:04:59 -0500 Joe D'Andrea
wrote:>>...Also, it hasn't been brought up lately on the list, so I'll mention that most experienced >>DNA'ers store their dates and times as numerical values (e.g. store the [math]{[date]}[/math] >>value instead of the [date] value) in their databases whenever they can. This makes searches, >>sorts and comparisons much easier and faster, and you can format the value for display in any way >>you wish using the [format days_to_date ...] context.>>Uhhh... Yeah I bought into that conspiracy a couple of years ago too. "store dates as integer" > Today, I say baloney. Once you understand how WebDNA handles dates, searching for a date or >doing date math is just as easy using mm/dd/yyy notation. I suspect the whole idea of "store >dates as integers" came about because WebDNA's date math was not understood. There may have even >been a bug in WebDNA that forced people to use integers instead of dates. I'm sure that's no >longer the case.>>When I was converting dates to integers, I was always getting caught trying to figure out what >the integer value of a certain date was if I ever had to examine the database manually, or update >a field using a generic database editor. I also find it easier when it's time to export a raw >database to have the dates stored as human readable dates.>>Sure, storing dates as integers saves a couple of octets on your hard drive, and you probably >save a few CPU cycles when you do integer math instead of date math. But that's why we have fast >CPUs and large disk drives.>>YMMV.. this is not a rant... just my opinion.>>~Joe>>-- >_______________________________________________________________> Joseph D'Andrea ~ http://www.west21.com/ ~ JoeDan@West21.com> WEST21.com Internet services for the 21st Century>webhosting ~ co-location ~ wireless access ~ WebCat programming>>------------------------------------------------------------->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://webdna.smithmicro.com/-------------------------------------------------------------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://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Joe,I have to agree with you... I am coding a date-related thing right now and I was wondering what was wrong with storing dates as [date] (MM/DD/YYY) like I've always done, which works fine for me as long as I specify &THE_DATE_FIELDtype=date in my search or whatever when I need to sort/display....Just my $0.02-Dan------------------------------------------------------------http://www.StrongGraphicDesign.comhttp://www.SearchBoise.com(208) 319-0137 | Toll-free p/f 877-561-1656------------------------------------------------------------On Mon, 15 Dec 2003 14:04:59 -0500 Joe D'Andrea wrote:>>...Also, it hasn't been brought up lately on the list, so I'll mention that most experienced >>DNA'ers store their dates and times as numerical values (e.g. store the [math]{[date]}[/math] >>value instead of the [date] value) in their databases whenever they can. This makes searches, >>sorts and comparisons much easier and faster, and you can format the value for display in any way >>you wish using the [format days_to_date ...] context.>>Uhhh... Yeah I bought into that conspiracy a couple of years ago too. "store dates as integer" > Today, I say baloney. Once you understand how WebDNA handles dates, searching for a date or >doing date math is just as easy using mm/dd/yyy notation. I suspect the whole idea of "store >dates as integers" came about because WebDNA's date math was not understood. There may have even >been a bug in WebDNA that forced people to use integers instead of dates. I'm sure that's no >longer the case.>>When I was converting dates to integers, I was always getting caught trying to figure out what >the integer value of a certain date was if I ever had to examine the database manually, or update >a field using a generic database editor. I also find it easier when it's time to export a raw >database to have the dates stored as human readable dates.>>Sure, storing dates as integers saves a couple of octets on your hard drive, and you probably >save a few CPU cycles when you do integer math instead of date math. But that's why we have fast >CPUs and large disk drives.>>YMMV.. this is not a rant... just my opinion.>>~Joe>>-- >_______________________________________________________________> Joseph D'Andrea ~ http://www.west21.com/ ~ JoeDan@West21.com> WEST21.com Internet services for the 21st Century>webhosting ~ co-location ~ wireless access ~ WebCat programming>>------------------------------------------------------------->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://webdna.smithmicro.com/-------------------------------------------------------------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://webdna.smithmicro.com/
"Dan Strong"
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:
WebCat virtual postcard is done! Thanks for the help! (1998)
[WebDNA] "The requested URL" error not allowing access to site... (2014)
Only charge card when product shipped ? (1997)
lineitems not showing when moving to a different OS (2006)
Problems searching from a FORM (1997)
Spamming this list! (2000)
WC2.0 Memory Requirements (1997)
RequiredFields template (1997)
Re:quit command on NT (1997)
High ASCII inside [LOOKUP] inside [LISTWORDS] (1998)
URL problem (2007)
Sorry WebDNA server not running. error (2002)
PIXO Support (1997)
textarea to page display (1998)
Shipcost lookup? (1997)
ErrorMessages.db suggestion (1997)
Help formatting search results w/ table (1997)
webcatalog approaching max (1998)
WebCat/Typhoon Status under Windows (1998)
typhoon... (1997)