Here is one way:
<@TRANSPOSE> the resultset, use <@ADDROWS> and then <@TRANSPOSE> it back.


>Basic question how do I add another column to the resultset or an array and
>store the value in milli seconds.any quick sugestions.
>
>thanx
>Prasad
>
>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]]On Behalf Of Mike Tyranski
>Sent: Tuesday, May 07, 2002 10:05 PM
>To: Multiple recipients of list witango-talk
>Subject: Re: Witango-Talk: Sort by date
>
>
>I don't remember how the sort tag behaves with dates.  You might have to do
>something
>like add another column where the date is converted to milliseconds and sort
>it that
>way.  I hope there is a better solution though.
>
>Mike
>
>Prasad Ramalingam wrote:
>
>>  hi everyone!
>>                  can anyone help me in sorting an array which contains date
>values.I
>>  remember this question being asked before and forgot the solution.I went
>and
>>  searched the archives in Witango and found only this which was of little
>>  help.
>>  I am afraid if there exist any solution for sorting a date column in an
>>  array using the <@SORT > command through some technique.
>>  If any other technique which is quick enough its most welcome.
>>
>>  The problem that I have is that I have few other cols like names and
>>  numerics which is also to be sorted based on the clients   action.
>>
>>  thanx
>>  Prasad R
>>  Tango Lead
>>  OfficeTiger Database Systems India Pvt. Ltd.
>>  mailto:[EMAIL PROTECTED]
>>  http://www.officetiger.com
>>
>>  ##########################################################################
>>  Author: Mailing List Subscriptions
>>  Posted: 14/08/1999 12:25:27 AM
>>  Yesterday, I mentioned that the only problem with @MAP is that it
>>  ONLY RETURNS A ONE COLUMN ARRAY (vs. updating a desired column in an
>>  array).
>>
>>  Depending upon record size and the likely number to be returned in a
>>  given foundset, we often put the resultSet into an Array and serve
>>  run the summary list functions from it. This provides all sorts of
>>  advantages.
>>
>>  One of the biggest is providing clickable column headers to sort
>>  ascending/descending. Since the sort is done in RAM, it's lightening
>>  fast.
>>
>>  HOWEVER, @SORT still doesn't accommodate dates nor times (was really
>>  hoping for Tango 3.6) which is a real drag since many lists include
>>  dates.
>>
>>  This is one area we have very little luck coming up with a realistic
>>  work around.
>>
>>  @MAP would be great if one could assign an entire row or column at a time:
>>  <@ASSIGN local$myArray[*,aDate] '<@MAP local$myArray
>>  value="#aDate" true="<@DATETOSECS DATE=#aDate>">'>
>>
>>  The above says to "Update" column "aDate" with aDate converted to
>>  seconds, which would then sort numerically just fine.
>>
>>  The other option would be to do an @ADDCOLS with the result of the
>>  @MAP to add a new column with the seconds and sort by it.
>>  Unfortunately, @ADDCOLS and @DELCOLS hasn't been seen as a priority
>>  for the development team (maybe a bunch of emails to the product
>>  manager would help?)
>>
>>  Thus, we're stuck.
>>
>>  Failing...
>>  1) @SORT supporting Dates
>>  2) @ASSIGN supporting rows/columns at a time
>>  3) @ADDCOLS, @DELCOLS support (this would be SO useful!)
>>
>>  The only way I can think of to sort a date/time in an array is to do
>>  a @ROWS loop and recreate the array. UGH! On arrays of any
>>  significant size this is really slow and consumes memory.
>>
>>  There's got to be a better way!?!
>>
>>  __________________________________________
>>  Chris OgdenInfoMatters, Inc.
>>  441/236-8183 http://InfoMatters.com
>>  Dynamic Website Design, Creation, Implementation,
>>  Promotion, Maintenance, and Software
>>
>############################################################################
>>  ###########3
>>
>>  ________________________________________________________________________
>>  TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
>>                  with unsubscribe witango-talk in the message body
>
>________________________________________________________________________
>TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
>                 with unsubscribe witango-talk in the message body
>
>________________________________________________________________________
>TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
>                 with unsubscribe witango-talk in the message body

________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Reply via email to