You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
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 ?
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.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment