Path: utzoo!yunexus!geac!syntron!jtsv16!uunet!tank!ncar!gatech!bloom-beacon!bu-cs!dartvax!eleazar.dartmouth.edu!boz From: boz@eleazar.dartmouth.edu (John Boswell) Newsgroups: comp.sys.mac.hypercard Subject: searching by dates in HC Message-ID: <10580@dartvax.Dartmouth.EDU> Date: 25 Oct 88 18:33:43 GMT Article-I.D.: dartvax.10580 Sender: news@dartvax.Dartmouth.EDU Reply-To: boz@eleazar.dartmouth.edu (John Boswell) Distribution: comp.sys.mac.hypercard Organization: Dartmouth College, Hanover, NH Lines: 41 (munch, munch) Hi. My question is relatively simple. (I hope the answer is too...) I'm developing a purchase order database in hypercard. I've implemented most of what I need, with the exception of a script that will give a summary of money spent during any given month on any given account. I'm stumped here. I want to be able to look at a card, see if the account number on the card is the one to be reported, and then check to see if the date is within the required range. It is this last requirement that gives me trouble. Sample script: put "10/1/88" into startDate put "10/31/88" into endDate --following is done for each proper card: put bg fld "date" into orderDate -- following if is where the script fails: if startDate < orderDate < endDate then -- do something else -- do something (i.e. beep) -- all I ever get is the beep. Now, I *really* didn't expect this to work, as what is in the startDate, endDate and orderDate containers is a string, and not a number. However, I can't figure out how to convert more than a character to a number. Can anyone help me implement something like the "if" routine above? (It's getting close to the end of the month *smile*). Thanks, John Boswell Dept. of Chemistry Dartmouth College Hangover, Nude Hampster 03755 boz@eleazar.dartmouth.edu