Re: Sorting search by date.

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 30346
interpreted = N
texte = >Got a small piece of WebDNA that goes through a database, and lists all the >results according to their date (UK date format). >It uses the following code: > >[search db=database.db&geREFdata=0&asdatesort=1] > >Which gives this result: > >Result1 - 10/03/2000 >Result2 - 10/03/2000 >Result3 - 10/04/2000 > > >As you can see, it's having problems doing a correct sort by date, as it's >only taking the first part of the date into account, and ignoring the month. > >Is there a way of achieving the correct result?If you don't tell webcat that REF is a date field, it will sort that field alphabetically, which is exactly what it's doing now. Try adding &REFtype=date to your search string ... -- ================================ Kenneth Grome, WebDNA Consultant 808-737-6499 http://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 Associated Messages, from the most recent to the oldest:

    
  1. Re: Sorting search by date. (Wilkins, John 2000)
  2. Re: Sorting search by date. (Mark Derrick 2000)
  3. Re: Sorting search by date. (Kenneth Grome 2000)
  4. Sorting search by date. (Mark Derrick 2000)
>Got a small piece of WebDNA that goes through a database, and lists all the >results according to their date (UK date format). >It uses the following code: > >[search db=database.db&geREFdata=0&asdatesort=1] > >Which gives this result: > >Result1 - 10/03/2000 >Result2 - 10/03/2000 >Result3 - 10/04/2000 > > >As you can see, it's having problems doing a correct sort by date, as it's >only taking the first part of the date into account, and ignoring the month. > >Is there a way of achieving the correct result?If you don't tell webcat that REF is a date field, it will sort that field alphabetically, which is exactly what it's doing now. Try adding &REFtype=date to your search string ... -- ================================ Kenneth Grome, WebDNA Consultant 808-737-6499 http://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 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:

Cobalt RaQ Installation (2003) when will the list move? (nm) (2000) A question on sub-categories (1997) blank fields (1999) Cart Numbers (1997) webcatalog approaching max (1998) First postarg not taking in $Commands (1997) WebCat2b12 CGI Mac -- Problems propagating the cart through (1997) Flash Stores (2003) [AppendFile] problem (WebCat2b13 Mac .acgi) (1997) [WebDNA] Fwd: RETS... HELP! (2009) RE: Include (1998) Database Repopulation (2004) FINAL: STILL not starting on bootup (2002) wrong input values? (1997) Need help with emailer- 2 issues (1997) Using Plug-In while running 1.6.1 (1997) Database Term [brainfart] (2003) Emailer choke (1997) Bug or syntax error on my part? (1997)