Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!bbn!apple!dan From: dan@Apple.COM (Dan Allen) Newsgroups: comp.sys.mac.hypercard Subject: Re: Need Help with doing a "dateTime" sort Message-ID: <27715@apple.Apple.COM> Date: 22 Mar 89 18:25:55 GMT References: <1030@atux01.UUCP> Organization: Apple Computer Inc, Cupertino, CA Lines: 22 In article <1030@atux01.UUCP> jlc@atux01.UUCP (J. Collymore) writes: >I have been trying for several days now to perform a sort of the date (and >time) in my HyperCard (HC) stack. > >Although I can get it to sort the date of my cards properly, I can not seem >to get it to also sort those dates according to the proper time, whether in >ascending (default) or descending order. For example, I sometimes get an >ascending sort showing card #1 as 3/20/89 at 5:39 PM before card #2 which >reads 3/20/89 at 5:22 PM! (Please note the times. In this example, the second >card should come FIRST.) My sort code reads: > >sort by dateTime word x of line x of bg field x You are sorting ONLY by the date (word x) rather than all of the line. It sounds like if you said sort by dateTime line x of bg field x that it would then sort the date and time. If it doesn't then you may need to convert the date and time to seconds and then sort on that. Dan Allen