Announcement

Collapse
No announcement yet.

Time-Question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Eric Pearson
    replied
    Fred --

    You sort it...

    12:01 AM
    10:22 AM
    11:03 AM

    Seriously, if they are strings in an array, I would create a second array of the same size and store either a "seconds" value (a LONG integer from 0-86,400) or a 24-hour time (a string from 00:00 to 23:59) as Semen suggested. Actually, since only hours and minutes are shown, you could store a "minutes" value in an INTEGER array. In any event, you would then use ARRAY SORT on the second array and use TAGARRAY to sort the original data in the same order.

    Whichever method you choose, you will need some kind of conversion function to convert the "people time" values into a sortable format.

    -- Eric

    -------------
    Perfect Sync: Perfect Sync Development Tools
    Email: mailto:[email protected][email protected]</A>

    Leave a comment:


  • Semen Matusovski
    replied
    There are two different questions: what to show on the screen, and how to store data.
    For example, standart format for date in Russia dd-mm-yy.
    But I always store like yymmdd - more useful for calculations, sorting and so on.
    Why not to convert time to 24h format ?

    Leave a comment:


  • Fred Oxenby
    started a topic Time-Question

    Time-Question

    How do you sort this:
    11:03 AM
    12:01 AM
    10:22 AM


    -------------
    Fred
    mailto:[email protected][email protected]</A>
    http://www.oxenby.se
Working...
X