Re: separate by mont (search)

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 46448
interpreted = N
texte = >1. In a database I have one of the entries as a date in this format >mm/dd/yyyy.No matter what other methods you use to store dates in a db, it is always a good idea to store the month, day and year in three separate fields in your db's ... for the exact reason that you've described here:>3. The customer wants to be able to display information by month >4. A search should display the months ie: Jan, Feb, Mar, Apr, etc..There is a way -- but it is convoluted and unintuitive at best, and I disposed of it as a standard coding technique years ago -- in favor of storing my dates in three separate fields.It is far simpler to store the three components of a date in three separate fields. Not only does this make all kinds of date searches extremely easy to code (and easy to modify or debug), it also means you can use three popup fields for dates in all your forms, with each form field corresponding directly to one of your three date component fields.By the way, if you happened to store your dates as the number of days since 0000 via the [math]{[date]}[/math] technique, there's no reasonable way to extract the values in a particular month -- so this technique is not good at all for searching by a particular month or year ... Sincerely, Kenneth Grome--------------------------------------------------- WebDNA Professional Training and Development Center 175 J. Llorente Street +63 (32) 255-6921 Cebu City, Cebu 6000 kengrome@webdna.net Philippines http://www.webdna.net ---------------------------------------------------------------------------------------------------------------- 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:

    
  1. Re: separate by mont (search) (John Hill 2002)
  2. Re: separate by mont (search) (Sam Lewis 2002)
  3. Re: separate by mont (search) (Kenneth Grome 2002)
  4. Re: separate by mont (search) (John Hill 2002)
  5. separate by mont (search) (Arturo Vargas 2002)
>1. In a database I have one of the entries as a date in this format >mm/dd/yyyy.No matter what other methods you use to store dates in a db, it is always a good idea to store the month, day and year in three separate fields in your db's ... for the exact reason that you've described here:>3. The customer wants to be able to display information by month >4. A search should display the months ie: Jan, Feb, Mar, Apr, etc..There is a way -- but it is convoluted and unintuitive at best, and I disposed of it as a standard coding technique years ago -- in favor of storing my dates in three separate fields.It is far simpler to store the three components of a date in three separate fields. Not only does this make all kinds of date searches extremely easy to code (and easy to modify or debug), it also means you can use three popup fields for dates in all your forms, with each form field corresponding directly to one of your three date component fields.By the way, if you happened to store your dates as the number of days since 0000 via the [math]{[date]}[/math] technique, there's no reasonable way to extract the values in a particular month -- so this technique is not good at all for searching by a particular month or year ... Sincerely, Kenneth Grome--------------------------------------------------- WebDNA Professional Training and Development Center 175 J. Llorente Street +63 (32) 255-6921 Cebu City, Cebu 6000 kengrome@webdna.net Philippines http://www.webdna.net ---------------------------------------------------------------------------------------------------------------- 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/ Kenneth Grome

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:

$Quit, $CloseDatabase corrections (1997) HTML Editors (1997) Running 2 two WebCatalog.acgi's (1996) [append] (1997) WebCatalog for guestbook ? (1997) [append] problem (1997) Search/sort in URL Was: GuestBook example (1997) pop-up list to select template (1999) Why are some admin pages not encrypted? (2000) WebCat2b13MacPlugin - [math][date][/math] problem (1997) [TCPSend] and whois? (1999) Where has WebDNA shown up in your life? (2003) Format question WC Mac f3 (1997) Subtotal Not Calculated on Invoice.html (1998) WebCatalog2 Feature Feedback (1996) who are you people (1998) Odd [math] behaviour (2003) cookie length (1998) [WebDNA] Feature Request: [returnhtml] (2016) [Announce] WebCatalog 3.0 Beta Program (1998)