BBS: Inland Empire Archive
Date: 02-15-94 (21:01) Number: 65
From: PETER MIKALAJUNAS Refer#: NONE
To: MARK SPIVEY Recvd: NO
Subj: Serious SORTING Problems! Conf: (2) Quik_Bas
MS> Ok, get this, A sort program I found in a QB manual will
MS> now work either, It sorts anything, and you specify the
MS> location and length of the key it sorts by, but it does the
MS> Keep in mind that I am using the same string type as above
MS> as the key for the sort. HELP!!!!!!!!!!!!!!!!
Sure, be glad to help. How does this sound?
OldDate$ = "02/03/90"
PRINT "The Original Date was " + OldDate$
PRINT "Which is very hard to sort as string."
Mth$ = MID$(OldDate$, 1, 2)
Dy$ = MID$(OldDate$, 4, 2)
Yr$ = MID$(OldDate$, 7, 2)
Slash$ = "/"
NewDate$ = Yr$ + Slash$ + Mth$ + Slash$ + Dy$
PRINT "So we changed to something more useful like " + NewDate$
PRINT "Which is very easy to sort as a string :-)"
* SLMR 2.1a * Daddy, when cows laugh, does milk come out their nose?
--- GEcho 1.00
* Origin: The Hideaway BBS 708.748.1911 HST/V32bis (1:115/748)