Here is a format that will work with the examples you provided. It will have to be tweaked for other combinations of values and structure. Attached is a sample data table with the formula applied
If( Row() == 1,
moList = {"January", "February", "March", "April", "May", "June", "July",
"August", "September", "October", "November", "December"};
moAbvList = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep",
"Oct", "Nov", "Dec"};
);
If(
Word( 3, :Mdfc, " /-" ) == "",
theDay = Num( Substr( :Mdfc, 1, 2 ) );
theMonth = Contains( moAbvList, Substr( :Mdfc, 4, 3 ) );
theYear = Num( Word( -1, :Mdfc, "abcdefghijklmnopqrstuvwxyz" ) );
Show( theday, themonth, theyear, Substr( :Mdfc, 4, 3 ) );,
Is Missing( Num( Word( 2, :Mdfc, " /-" ) ) ) == 1,
theDay = Num( Word( 1, :Mdfc, " /-" ) );
theMonth = Contains( moList, Word( 2, :Mdfc, " /-" ) );
theYear = Num( Word( 3, :Mdfc, " /-" ) );,
Is Missing( Num( Word( 1, :Mdfc, " /-" ) ) ) == 1,
theDay = Num( Word( 2, :Mdfc, " /-" ) );
theMonth = Contains( moList, Word( 1, :Mdfc, " /-" ) );
theYear = Num( Word( 3, :Mdfc, " /-" ) );,
theDay = Num( Word( 2, :Mdfc, " /-" ) );
theMonth = Num( Word( 1, :Mdfc, " /-" ) );
theYear = Num( Word( 3, :Mdfc, " /-" ) );
);
Date MDY( theMonth, theDay, theYear );
Jim