Re: user selectable sort order

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 33723
interpreted = N
texte = >As for the urban legend. I thought someone from PCS had mentioned >once that storing dates as numbers would speed up sorting and >comparisons as they would be treated as numbers. Because storing >them as real dates causes WC to convert them to numbers first before >doing any calculations.Converting from text to a number is slightly faster than converting from text to a date, so yes, technically this is true. But the original question was not about speed -- it was about getting the sort to work at all. We do not want people to think that there is some problem with sorting properly-formatted dates...there is no problem, and never has been.>For this reason I am planning on converting the dates from the >existing format to the text sortable. Could you please verify the >above for me and the other here as far as performance goes?The fastest way to sort dates is to store the dates in 'text sortable' form in your database, which is of the form yyyy/mm/dd, because when presented that way (making sure all numbers have preceding zeros as necessary to fill out to a fixed width), the text does not have to be converted into numbers or dates -- it simply alphabetizes properly as-is. http://search.smithmicro.com/ uses this technique.This has the advantage of being human-readable as well, compared to some days since 0/0/0000 numeric format that just looks like a huge number.Technical Support ********************************** Smith Micro, Internet Solutions Div | eCommerce (WebCatalog) 16855 West Bernardo Drive, #380 | ------------------------- San Diego, CA 92127 | Software & Site Development WebCatalog Support: (858) 675-0632 | http://www.smithmicro.com Fax: (858) 675-0372 **********************************------------------------------------------------------------- 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:

    
  1. Re: user selectable sort order (WebDNA Support 2000)
  2. Re: user selectable sort order (Dale 2000)
  3. Re: user selectable sort order (WebDNA Support 2000)
  4. Re: user selectable sort order (Nitai @ Eyework 2000)
  5. Re: user selectable sort order (Dale Therio 2000)
  6. Re: user selectable sort order (Nitai @ Eyework 2000)
  7. user selectable sort order (Dale 2000)
>As for the urban legend. I thought someone from PCS had mentioned >once that storing dates as numbers would speed up sorting and >comparisons as they would be treated as numbers. Because storing >them as real dates causes WC to convert them to numbers first before >doing any calculations.Converting from text to a number is slightly faster than converting from text to a date, so yes, technically this is true. But the original question was not about speed -- it was about getting the sort to work at all. We do not want people to think that there is some problem with sorting properly-formatted dates...there is no problem, and never has been.>For this reason I am planning on converting the dates from the >existing format to the text sortable. Could you please verify the >above for me and the other here as far as performance goes?The fastest way to sort dates is to store the dates in 'text sortable' form in your database, which is of the form yyyy/mm/dd, because when presented that way (making sure all numbers have preceding zeros as necessary to fill out to a fixed width), the text does not have to be converted into numbers or dates -- it simply alphabetizes properly as-is. http://search.smithmicro.com/ uses this technique.This has the advantage of being human-readable as well, compared to some days since 0/0/0000 numeric format that just looks like a huge number.Technical Support ********************************** Smith Micro, Internet Solutions Div | eCommerce (WebCatalog) 16855 West Bernardo Drive, #380 | ------------------------- San Diego, CA 92127 | Software & Site Development WebCatalog Support: (858) 675-0632 | http://www.smithmicro.com Fax: (858) 675-0372 **********************************------------------------------------------------------------- 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/ WebDNA Support

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:

Email Format (Umlaut) (2004) Emailer (1997) Error 11 (1996) browser info.txt and SSL (1997) Multiple Users.db Possible? (1997) Possible Bug in 2.0b15.acgi (1997) Normalizing Dates and Phone numbers (2000) method of payment (1997) SendMail - sending message to more than one person from form (2006) Newbie questions (1999) [lineitems] and [writefile] (1998) [ShowNext] (1997) [WebDNA] Anyone use this coding style for readability... (2010) WebCatalog and directory indexing (1998) Mac Vs WindowsNT (1997) Balancing randomness (2000) Field names beginning with Reg.. (2002) [WebDNA] Limited Time Discount on WebDNA Server licenses (2013) What is WebDNA (1997) Separate SSL Server (1997)