sort dateTime problem
Timothy Miller
gandalf at doctorTimothyMiller.com
Wed Dec 14 19:53:09 EST 2005
Greetings,
One line of a script I'm working on goes:
sort lines of cd field "schedule.2" datetime by item 2 of each.
Each line has four items. Item 2 consists of dates in short date
format, e.g., 12/2/04.
All 2005 dates come up in correct sequence, from earliest to latest.
However, after sorting, 2004 dates *follow* 2005 dates, instead of
preceding them. That is not a correct sort.
Am I doing something wrong?
Is the sort datetime command intendend to sort dates in short date
format? Or is this a bug? (I couldn't find anything in the
documentation or bugzilla, but I might have overlooked it.)
I could do something like converting the short dates to seconds,
sorting numerically, then converting seconds back to short date. I'd
rather not, though.
Thanks in advance,
Tim
More information about the use-livecode
mailing list