Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!gem.mps.ohio-state.edu!apple!tecot From: tecot@Apple.COM (Ed Tecot) Newsgroups: comp.sys.mac.hypercard Subject: Re: Sorting by Date in HyperCard Message-ID: <35201@apple.Apple.COM> Date: 2 Oct 89 23:00:48 GMT References: <1102@orbit.UUCP> Organization: Apple Computer Inc, Cupertino, CA Lines: 18 In article <1102@orbit.UUCP> american@pnet51.orb.mn.org (Jeff Iverson) writes: >lih@cunixd.cc.columbia.edu (Andrew Lih) writes: >>If I have a whole bunch of cards with a bkgd field that contains a >>date in short format (6/9/89, for example), what is the best way to >>sort this in chronological order? Is there a way in HyperCard or has >>anyone written an XCMD to do this? > >To do the sort, convert the contents of the field to seconds, then sort >numeric by that field, when the sort is done, convert the field to short date >which will give you all dates in the form xx/xx/xx with slashes instead of >dashes. > > [sample script omitted] Dan Winkler sent me a simpler way to do this and asked me to post it to the net: sort dateTime by field "dateField"