Re: Storing dates (was: Re: Ticket Ordering Question)
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 54985
interpreted = N
texte = I suppose either way has its merit. There is no reason onecouldn't store both either ;-). When one is doing a timing thing..schedulling, job clock, banner manager.. date and time as integeris a real help. To sum it up, I have found it much easier to do precisedate/time functions with integers.DonovanJoe 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> -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE Eucalyptus Design <-Web Development (specializing in eCommerce), -> <-Graphic Design, and Pre-Press Consultation -> ADDRESS:> Donovan Brooke DBA Eucalyptus Design N2862 Summerville Park Rd. Lodi, WI 53555 PH:> 1.608.592.3567 Web:> http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o-------------------------------------------------------------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:
I suppose either way has its merit. There is no reason onecouldn't store both either ;-). When one is doing a timing thing..schedulling, job clock, banner manager.. date and time as integeris a real help. To sum it up, I have found it much easier to do precisedate/time functions with integers.DonovanJoe 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> -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE Eucalyptus Design <-Web Development (specializing in eCommerce), -> <-Graphic Design, and Pre-Press Consultation -> ADDRESS:> Donovan Brooke DBA Eucalyptus Design N2862 Summerville Park Rd. Lodi, WI 53555 PH:> 1.608.592.3567 Web:> http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o-------------------------------------------------------------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/
Donovan Brooke
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:
[WebDNA] making a gift cert. (in effect) it's own lineitem/'product' (2008)
pc (1997)
Outsourcing partnership ... (2005)
Price Hacking (1998)
Uppdate Qty (2000)
Using Plug-In while running 1.6.1 (1997)
need to add a sku field to an existing db (2005)
Re:Emailer and encryption (1997)
Exclude by date - multiple (1997)
GuestBook example (1997)
FAX orders (1996)
Weird bug, or is there something amiss? (1997)
WC2b15 - [HTMLx]...[/HTMLx] problems SOLVED! (1997)
(2000)
SSL Certs (2003)
Problems getting parameters passed into email. (1997)
READFILE command? (1998)
Gantt style chart (2004)
[SearchString] problem with [search] context (1997)
[if] and [showif] (2002)