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 DevelopmentWebCatalog 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:
>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 DevelopmentWebCatalog 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:
exclusive db lock with webcat-3 ? (2000)
For you Unix gurus [OT] (2002)
Multiple Pulldowns (1997)
WebCatalog2 Feature Feedback (1996)
Wait, I forgot something! (was authenticating a seconduser, the sequel) (1997)
Webcat causing crashes left and right! (1997)
using showpage and showcart commands (1996)
WC2.0 Memory Requirements (1997)
problems with 2 tags shakur (1997)
.. more on sliding discounts... (1997)
bug in [SendMail] (1997)
Lookup Notfound (1998)
WebCat2b13MacPlugin - [math][date][/math] problem (1997)
More than one db with the same namn (was: WC2f3) (1997)
IIS and 4.0.1b1 (2000)
Secure server question (1997)
Append (1999)
multi-paragraph fields (1997)
Close Databases Crash? (1998)
item sorting (1997)