! ----- MMDDYY.FUN ----- ! ! ----- FUNCTION TO FORMAT A DD-MMM-YYYY DATE AS MM/DD/YY ----- ! ! ----- Last Change 07/06/93 by Brian Lomasky ----- ! FUNCTION STRING MMDDYY(STRING MMDDYY_DATE) DECLARE STRING TEMP_STRING ! TEMPORARY STRING TEMP_STRING = MMDDYY_DATE ! ----- Find Month Index, Make Date MMDDYY ----- TEMP_STRING = "0" + RIGHT(TEMP_STRING, 2%) & IF LEFT(TEMP_STRING, 1%) = " " TEMP_STRING = NUM1$((POS("JANFEBMARAPRMAYJUNJULAUG"+ & "SEPOCTNOVDEC", MID(TEMP_STRING, 4%, 3%), 1%) & + 2%) / 3%) + "/" + LEFT(TEMP_STRING, 2%) + "/" & + MID(TEMP_STRING, 10%, 2%) ! ----- ENSURE LENGTH OF EIGHT ----- TEMP_STRING = "0" + TEMP_STRING IF LEN(TEMP_STRING) < 8% MMDDYY = TEMP_STRING ! RETURN DATE AS MM/DD/YY END FUNCTION